<html>
<head>
<script>
function doSubmit(e) {alert(e.target.name + '\nok!');}
window.addEventListener('submit',doSubmit, false);
</script>
</head>
<body>
<form name="form1">
<input type="text"><br>
<input type="text"><br>
<input type="text"><br>
<input type="submit" value="submit">
</form>
<form name="form2">
<input type="text"><br>
<input type="text"><br>
<input type="text"><br>
<input type="submit" value="submit">
</form>
<form name="form3">
<input type="text"><br>
<input type="text"><br>
<input type="text"><br>
<input type="submit" value="submit">
</form>
<script>
</script>
</body>
</html>