Form onSubmit event handler : onSubmit « Form « JavaScript Tutorial






<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
function sendMe()
{
    return confirm("Do you want to continue the submission?");
}

//  -->
</script>
</head>
<body>
<form name="form1" method="POST" action="" onSubmit="return sendMe()">
<P><input type="text" name="inp1">
<input type="submit" value="Submit" >
<input type="reset" value="Reset"></p>
</form>
</body>
</html>








10.24.onSubmit
10.24.1.Form onSubmit event handler