<form id="form3" name="form3" method="post" action="info.asp">
<script language="javascript">
//全选函数
function fnCheckAll(v,c)
{
//alert(eval('document.form3.'+c).length)
if(v.checked)
{
for (i=0;i<eval('document.form3.'+c).length;i++){
eval('document.form3.'+c).checked = true;
}
}
else
{
for (i=0;i<eval('document.form3.'+c).length;i++){
eval('document.form3.'+c).checked = false;
}
}
}
</script>
<input id="Infrastructure" type="checkbox" value="水电" name="Infrastructure" />
水电
<input id="Infrastructure" type="checkbox" value="宽带" name="Infrastructure" />
宽带
<input id="Infrastructure" type="checkbox" value="管道气" name="Infrastructure" />
管道气
<input id="Infrastructure" type="checkbox" value="有线电视" name="Infrastructure" />
有线电视
<input id="Infrastructure" type="checkbox" value="电梯" name="Infrastructure" />
电梯
<input id="Infrastructureall" type="checkbox" name="Infrastructureall" onclick="javascript:fnCheckAll(this,'Infrastructure');" />
<font
color="#ff0000">全选</font></label>
</form>
function checkAll() { var code_Values = document.all['code_Value']; if(code_Values.length){ for(var i=0;i<code_Values.length;i++) { code_Values[i].checked = true; } }else{ code_Values.checked = true; } } function uncheckAll() { var code_Values = document.all['code_Value']; if(code_Values.length){ for(var i=0;i<code_Values.length;i++) { code_Values[i].checked = false; } }else{ code_Values.checked = false; } } function multipleDelete() { var num = 0; var code_Values = document.all['code_Value']; if(code_Values.length){ for(var i=0;i<code_Values.length;i++) { if(code_Values[i].checked == true) { num ++; } } }else{ if(code_Values.checked == true){ num ++ ; } } if(num == 0){ alert('Please select delete item'); } if(num >0){ document.BuCodeSearch.action = '<%=EusUtil.getPage("lookup.generic.bucode.delete.s")%>'; document.BuCodeSearch.submit(); } } </script>
function checkAll() { var code_Values = document.getElementsByTagName("input"); for(i = 0;i < code_Values.length;i++){ if(code_Values[i].type == "checkbox") { code_Values[i].checked = true; } } } function uncheckAll() { var code_Values = document.getElementsByTagName("input"); for(i = 0;i < code_Values.length;i++){ if(code_Values[i].type == "checkbox") { code_Values[i].checked = false; } } } function multipleDelete() { if (document.BuCodeSearch.elements["code_Value"]) { var num = 0; var fm = document.BuCodeSearch; if (document.BuCodeSearch.elements["code_Value"]) { var elm = document.BuCodeSearch.elements["code_Value"]; var ename = "code_Value"; if (elm.length) { var len = fm.elements[ename].length; for (var i = 0; i< len; i++) { var e = fm.elements[ename][i]; if (e.checked == true){ num++; } } } else { if (elm.checked == true ) { num++; } } if (num > 0 ) { document.BuCodeSearch.action = '<%=EusUtil.getPage("lookup.generic.bucode.delete.s")%>'; document.BuCodeSearch.submit(); } } } }
<td align="left" width="20"><input type="checkbox" name="code_Value" value="<%=userDefFieldValueBean.getUdfValue()%>"></td>