multibox 全选

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>

 

你可能感兴趣的:(html,bean)