Consider this HTML:
<input type="text" name="inputa[42]" value="2012-05-02" />
<input type="text" name="inputb[42]" value="74,178" />
<input type="text" name="inputa[85]" value="2013-02-14" />
<input type="text" name="inputb[85]" value="21,35" />
How to use a jQuery selector to get the value of the input with name inputa[85]
?
It would have been very easy if the name wouldn't have contained [85]
, but now I can't get $("input[name=inputa[85]]")
to work which is understandable, but how to solve it (without changing the name attribute)?
In quotes:
$("input[name='inputa[85]']")
or
$('input[name="inputa[85]"]')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With