先看一段代碼: html
<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>
網上流行的說法就是 測試