Javascript examples for DOM HTML Element:Form
Use function to control <form> via onsubmit event handler
<html> <head> <script type="text/javascript"> function ask () {/* w ww .ja va2s.c o m*/ return false; } </script> </head> <body> <form method="post" action="deletion.php" onsubmit="return ask()"> Enter user ID to delete <input type="text" name="uid"> <br> <input type="submit" value="Delete user"> </form> </body> </html>