<html> <head> <title>Function Demo</title> <script> function pass() { alert("Submit"); } </script> </head> <body> <form onsubmit="pass()"> Name : <input type="text" value="text"> <input type="submit" value="Submit"> </form> </body> </html>