jQuery submit()
handle submit event
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"> </script>//from w w w .j a va 2 s .c o m <script> $(document).ready(function(){ $("form").submit(function(){ document.getElementById("demo").innerHTML = "Submitted"; }); }); </script> </head> <body> <p id="demo"></p> <form action=""> First name: <input type="text" name="FirstName" value="CSS"><br> Last name: <input type="text" name="LastName" value="HTML"><br> <input type="submit" value="Submit"> </form> </body> </html>