function doEdit() {
var intCount = checkCount();
var checkvalue;
if (intCount <= 0) {
alert("请选择一条记录!");
return;
} else if (intCount > 1) {
alert("请只选择一条记录!");
return;
}
if (document.deptlist.deptID.length>1) {
for (i = 0; i < document.deptlist.deptID.length; i++) {
if (document.deptlist.deptID[i].checked) {
checkvalue = document.deptlist.deptID[i].value;
}
}
} else {
if (document.deptlist.deptID.checked)
checkvalue = document.deptlist.deptID.value;
}
document.deptlist.action = "<%=contextPath%>/deptManage.htm?actionType=edit";
document.deptlist.submit();
}
var intCount = checkCount();
var checkvalue;
if (intCount <= 0) {
alert("请选择一条记录!");
return;
} else if (intCount > 1) {
alert("请只选择一条记录!");
return;
}
if (document.deptlist.deptID.length>1) {
for (i = 0; i < document.deptlist.deptID.length; i++) {
if (document.deptlist.deptID[i].checked) {
checkvalue = document.deptlist.deptID[i].value;
}
}
} else {
if (document.deptlist.deptID.checked)
checkvalue = document.deptlist.deptID.value;
}
document.deptlist.action = "<%=contextPath%>/deptManage.htm?actionType=edit";
document.deptlist.submit();
}
后台接收的是FORM的名的数值 跟那个变量有什么关系
对复选框的控制,限定只选中一条且只能一条记录,再执行相应的操作!
总的来说就是控制复选框....