Javascript DOM Form Submit event handler
<html> <head></head> <body> In-line event registration/*from w ww.j a v a 2 s . c o m*/ <script type="text/javascript"> function checkForm(formObj) { // Cancel the form submit return false; } </script> <form onsubmit="return checkForm(this)"> <input type="submit" value="Click me to submit!"> </form> </body> </html>