if($("input[type=radio]").prop("checked")){
$("input[type=radio]").prop("checked",true);
}else{
$("input[type=radio]").prop("disabled",false);
}
本人研究了半天,在网上搜了一大堆答案。还是无法实现input radio多次单选再取消选中。
如果用input radio两个单项 就容易多,关键是一个input radio是怎么让用户单击选中,
当用户不想要这个radio的时候 就取消掉。
我写判断 条件不对吗?


http://jsbin.com/buxequwasu/edit?html,js,output
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
判断条件写错了吧...jquery的prop方法一个值是返回当前值...
两个值表示设置为后一个值╮(╯▽╰)╭
用checkbox