日期:2014-05-18 浏览次数:21351 次
//全局变量,用于存取选中的日历 var checkList = {}; //获取选中的日历复选框 function getCheck(checkName, hidName, chkAllName) { alert(document.getElementById(checkName).checked); var chek = document.getElementById(checkName); var hid = document.getElementById(hidName); if (chek.checked) { checkList[checkName] = hid.value; } else { document.getElementById(chkAllName).checked = false; checkList[checkName]=null; } } //关闭; function cls() { var win = document.getElementById("Panel1"); win.style.display = "none"; } //itemImage全选及全不选 function _ChooseAllImage(sel, check) { var objtb = document.getElementById(sel); var num = objtb.getElementsByTagName("input"); var check = document.getElementById(check); for (i = 0; i < num.length; i++) { if (num[i].tagName == "INPUT") { if (check.checked == true) { if (num[i].type == "checkbox") { if (num[i].checked != true) { num[i].checked = true; checkList[num[i].id]=num[i+1].value; } } } else { num[i].checked = false; checkList[num[i].id] = null; } } } } </script>