onsubmit
<html>
<head>
</head>
<body>
<form onsubmit="doSubmit()">
<input type="text"><br>
<input type="text"><br>
<input type="text"><br>
<input type="submit" value="submit">
<form>
<script>
function doSubmit() {alert('ok!');}
</script>
</body>
</html>