在取消选中所有复选框后,我想让单选按钮选中,但现在当我取消选择所有复选框时它不起作用。帮助!
<script>
$(document).ready(function() {
function uncheck(radio,checkbox){
var fliter_checkbox=$(checkbox);
var fliter_radio=$(radio);
fliter_checkbox.click(function(){
fliter_checkbox.each(function(){
fliter_radio.attr("checked",false);
if(fliter_checkbox.attr("checked")==false){
fliter_radio.attr("checked",true);
}
})
})
fliter_radio.click(function(){
fliter_radio.each(function(){
fliter_checkbox.attr("checked",false);
})
})
}
uncheck('#fliter input[name="vendor_all"]','#fliter input[name="vendor"]');
})
</script>