我使用Struts1.3的所有复选框,并在此Jsp页面动态生成复选框在数据库取决于可用的数据。我的代码是产生复选框是遵循经过一个Jsp页面
<table width="850" border="0" align="left" cellpadding="2" cellspacing="0">
<tr>
<td width="100" align="center" bgcolor="#F3F3F3"><label>
<html:checkbox name="ExporterForm" value="<%=authlist.get(i).getAuthorityid()%>" property="exportauthority" styleId="checkbox99" />
</label></td>
<td align="center" class="text_exp" ><%=authlist.get(i).getAuthorityname()%></td>
</tr>
</table>
我还有一个复选框(selectAll
),和查询是,我想要标记检查了所有而全选复选框的选择。
和我的代码是检查了所有复选框在下面给出,但它选择只有一个,需要选择所有,请告诉我去实现它的路径。
function selectAllAuthorites()
{
var selectAll=document.getElementById("checkbox101")
if(selectAll.checked==true)
{
document.getElementById("checkbox99").checked=true;
}
}
非常感谢它帮助我。 – subodh
不客气。 :) – HashimR
谢谢,你可以给我任何提交收集作为struts1.3形式的例子。或者你能否提供我的解决方案http://stackoverflow.com/questions/7971017/in-struts1-3-how-handling-multiple-formbean-property-to-action – subodh