纠正jQuery获取radio选中值的写法
?
<input type="radio" name="aaa" value="1" checked="true">aaa <input type="radio" name="aaa" value="2">bbb <input type="radio" name="aaa" value="3">ccc <input type="button" value="ok" onclick="doTest()"> <script language="JavaScript"> <!-- function doTest(){ alert($("input[name='aaa'][checked]").val()); } //--></script>
?网上流行的说法就是
?
$(input[name='aaa'][checked]).val()