How To Find Which Button Was Clicked To Submit A Form Using jQuery
erics, Posted July 2nd, 2011 at 3:43:12pm
1 2 3 4 5 6 7 8 9 10 |
var WhichButton; jQuery('button').live('click', function() { WhichButton = this.id; }); jQuery('form').live( 'submit', function() { alert( 'Button ID: ' + WhichButton ); return false; }); |
Leave Your Comment
All fields marked with "*" are required.