Posted in Javascript onMarch 22, 2009
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>
javascript multibox 全选
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@