How do I specify a submit button ID in a variable using JQuery?
I have the following HTML:
  & lt; Form id = "myForm" & gt; & Lt; Input ID = "Onovo" type = "submit" value = "OK and Nowo" /> & lt; Input id = "OK" type = "submit" value = "OK and Fracture" /> & lt; / Form & gt;   JS:
  var Boto; $ (Document) .ready (function () {$ ("# myForm input [type = submit]"). Click (function) (botao = $ (this) .attr ('id'); alerts (" Id É "+ Botoeo);});});   You can see live
I have already managed to indent the button clicked with help, but the problem is now
 your code is correct; you have to add the end bracket  at the end) . 
  $ (document) .ready (function () {^ unclosed   
Comments
Post a Comment