检查复选框或单选框是否有被用户选中
2011-09-30 15:29
190 查看
//该函数用于检查复选框或单选框的内容是否有被用户选中
function isnull_checkbutton(itemname,promptmsg){
var itemx = document.getElementsByName(itemname);
if (itemx != null){
if (itemx.length>0){
for (var i=0;i<itemx.length;i++){
if (itemx[i].checked == true){
return "";
}
}
return "请选择" + promptmsg + "\n";
}
}
}
function isnull_checkbutton(itemname,promptmsg){
var itemx = document.getElementsByName(itemname);
if (itemx != null){
if (itemx.length>0){
for (var i=0;i<itemx.length;i++){
if (itemx[i].checked == true){
return "";
}
}
return "请选择" + promptmsg + "\n";
}
}
}
相关文章推荐
- javascript判断单选框或复选框是否选中方法
- javascript判断单选框或复选框是否选中方法集锦
- javascript判断单选框或复选框是否选中方法集锦
- 检查一组复选框是否选中
- 选中 复选框单选框 提高用户体验
- 检测单选框或复选框是否选中
- JS检查单选框、复选框是否选择,并限制复选框个数
- jquery 判断复选框是否全部选中
- ###### bos实战之:用户修改角色:回显 权限(复选框选中)和回显 菜单(zTree树结点选中)。收获总结
- 检查用户在文本框中是否是连续输入的状态
- 不定数量的CheckBox如何判断用户是否选中
- java Filter之拦截jsp页面检查用户是否已经登录
- 如何检查用户的ios设备上是否安装了某些app?
- Filter实际应用--检查用户是否登录的过滤器
- javaWEB总结(33):检查用户是否登陆过滤器
- jquery几种用来检查checkbox是否选中的方法
- 复选框checkbox 判断是否选中、批量选中
- javascript判断复选框是否选中的方法
- JS判断单选框是否选中