Capture form submit JQuery

Make sure jQuery library file is referenced in the code

The Javascript part

[code]

<script language="javascript" type="text/javascript">
$(document).ready(function () {
$(‘#signup’).submit(function () {
alert(‘form submit() called’);
return false;
});
});
</script>

[/code]

HTML form

[code]

<form id="signup" name="signup" action="/Submit/" method="post">

<input name="btnSubmit" type="submit" value="Sign Up" />

</form>

[/code]

Get Free Email Updates!

Signup now and receive free offers, discounts & coupon codes

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Leave a Reply

Your email address will not be published. Required fields are marked *

CommentLuv badge