'onSubmit' Example : onSubmit « Event onMethod « JavaScript DHTML






'onSubmit' Example

 
    
<html>
<body>
<form name="form1" 
      method="post" 
      action="" 
      onsubmit="alert('The form is being submitted')">
   <input type="text" name="textfield">
   <input type="submit" value="Submit">
</form>
</body>
</html>

    
      
        
  








Related examples in the same category

1.Validate form in onsumbit function
2.onsubmit action