Javascript examples for jQuery:Form Submit
Triggering the submit handler with jQuery
<html> <head> <script src="https://code.jquery.com/jquery-latest.min.js"></script> </head> //w ww . j av a 2 s .c o m <body> <script> $(function() { $('#target').submit(function() { console.log('Handler for .submit() called.'); return false; }); }); </script> <form id="target" action="destination.html"> <input type="text" value="Hello there"> <input type="submit" value="Go"> </form> <div id="other"> Trigger the handler </div> </body> </html>