javascript multibox 全选
人气:0复制代码 代码如下:
function allselect()
{
try{
var checkedcount=0;
for(var i=0;i<form1.orgIds.length;i++)
{
if(form1.orgIds[i].checked)
checkedcount++;
}
if(checkedcount==form1.orgIds.length)
{
for(var i=0;i<form1.orgIds.length;i++)
{
form1.orgIds[i].checked=false;
}
}
else
{
for(var i=0;i<form1.orgIds.length;i++)
{
form1.orgIds[i].checked=true;
}
}
if(form1.orgIds.checked==true)
form1.orgIds.checked=false;
else
form1.orgIds.checked=true;
}catch(ex){}
}
复制代码 代码如下:
<SPAN style="CURSOR:hand" onclick="allselect()">(全选)</SPAN>
<logic:iterate id="result" name="zclist" indexId="ind">
<html:multibox property="orgIds"><bean:write name="result" property="someProperty"/></html:multibox>
</logic:iterate>
加载全部内容