jQuery, radio button getting value
Hay, how ca开发者_运维知识库n i get the value of this? i.e. which one is selected.
<input type='radio' name="thing" value="on" checked>
<input type='radio' name="thing" value="off">
I cant get the value with
$("input[name='thing']").val()
Thanks
How about:
$("input[name='thing']:checked").val()
solution is found
$("input[name='thing']:checked").val()
精彩评论