62,074
社区成员
发帖
与我相关
我的任务
分享
function CheckAll(form) {
var chkObj = document.getElementsByTagName("input");
for (i = 0; i < chkObj.length; i++) {
if (chkObj[i].type == "checkbox" && chkObj[i].name != 'checkAll') {
var subcheckname = chkObj[i].name.split("$");
if (subcheckname[subcheckname.length - 1] == "chkSelect")
chkObj[i].checked = form.checkAll.checked;
}
}
}
function checktrue()
{
var tag=false;
var chkother=document.getElementsByTagName("input");//找模版中CheckBox
for(var i=0;i<chkother.length;i++)
{
if(chkother[i].type=='checkbox')
{
if(chkother[i].id.indexOf('sel2')>-1)
{
if(chkother[i].checked==true)
{
tag=true;
}
}
}
}
if(tag==true)
{
if(confirm("确定删除选中的行吗?"))
{
return true;
}
else
{
return false;
}
}
else
{
alert("请先选中要删除的行!");
}
return tag;
}