检查复选框或单选框是否有被用户选中
- //该函数用于检查复选框或单选框的内容是否有被用户选中
-
- 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";
- }
- }
- }