How to detect which submit button is clicked in jquery -
If I have 2 forms on my button, then can be detected as to which clicked In Jquery? It is constantly returning "button1" You do not need unique IDs to use your supplied HTML : I believe that you should rename on one of the buttons
& lt; Input name = "submit" type = "submit" value = "button1" & gt; & Lt; Input name = "submit" type = "submit" value = "button2" & gt;
warning ($ ("input [name = submit]"). Val ());
$ ("input [type = submit]"). Click (function () {warning ($ (this) .val ());}); Edit
Comments
Post a Comment