单项选择题
页面中有一个性别单选按钮,请设置”男”为选中状态。代码如下:<input type="radio" name="sex"> 男<input type="radio" name="sex"> 女 正确的是()
A.$("sex[0]").attr("checked",true)B.$("#sex[0]").attr("checked",true)
C.$("[name=sex]:radio").attr("checked",true)
D.$(":radio[name=sex]:eq(0)").attr("checked",true)
点击查看答案&解析
