jquery 判断单选按钮是否选中,多选按钮是否选择


 

单选按钮:

var checkItem = $("input[type=radio][name=rblIviGender]:checked");
if (checkItem.length <= 0) {
MsgTip.show({ msg: "请选择性别!", ico: "warning" });
return;
}

 

多选按钮:

//产品类型
var checkItem = $("input[type=checkbox][name=TypID]:checked");
if (checkItem.length <= 0) {
MsgTip.show({ msg: "请选择主营产品!", ico: "warning" });
return;
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM