记录下今天碰到的问题
<input type="radio" name="test" value="1">是
<input type="radio" name="test" value="0" checked='"checked">否
在给radio 附上点击事件时 同时全部取消 checked属性 removeAttr('checked') 再设置 prop('checked','checked')
再在别的地方要拿radio 的值 只拿被选中的值的话 $(".test").each(function(i){
if($(this).prop('checked')){
alert(拿到被选中的值);
}
})