解决方案 »
- dto传对象给action,取不到dto中对象的属性
- 我想导出extjs的gridpanel中的内容到excel文件,然后自动保存在服务端,如何实现
- 在线等待 !spring + hibernate 应用出现的BeanCreationException !
- 求助!插入数据7000条之后(共两万条),每条需要一秒钟
- 急求《Servlet与JSP核心编程》
- sql语句的问题
- fileupload疑难问题。。。高分求助
- n天没人理了!
- 没分了,但是jsp中怎么获得客户端上次请求的URL的信息呢?
- 初学servlet,遭到挫折,请大虾们不啬赐教!
- 求j2ee web框架 demo
- 刚学html,想问下这些关键字的作用是啥
$("[name = categorySelected]:checkbox").each(function(){
if($(this).attr("checked"))
{txt+=$(this).val()+","}}) $('tableId tr').each(function(){alert($(this).find('td').eq(3).find('input').val());
alert($(this).find('td').eq(5).find('input').val());
});
解决代码
jsp代码:
<tr style="border: 0px;" bgcolor="#6699CC" >
<td colspan="5" align="center" bgcolor="#6699CC" style="border: 0px;">
<table bgcolor="#6699CC" align="left" style="width: 100%; text-align: center; border: 0px;">
<p align="center" bgcolor="#6699CC" class="pt14-white">监督检测专业类别</p>
<s:iterator value="categoryList" status="status">
<tr>
<td align="center" bgcolor="#FFFFFF" class="pt12-black"> <input type="hidden" name="showList[<s:property value="#status.index"/>].key" value="<s:property value="%{key}" />"/></td>
<td width="15%" bgcolor="#FFFFFF" class="pt12-black" align="left"><input type="checkbox" name="showList[<s:property value="#status.index"/>].type" value="1"/><s:property value="%{value}" /></td>
<td width="15%" bgcolor="#FFFFFF" class="pt12-black" align="right">检测件数:</td>
<td width="12%" bgcolor="#FFFFFF" class="pt12-black"><input type="text" name="showList[<s:property value="#status.index"/>].checkNumber" /></td>
<td width="15%" bgcolor="#FFFFFF" class="pt12-black" align="right">合格件数:</td>
<td width="13%" bgcolor="#FFFFFF" class="pt12-black"><input type="text" name="showList[<s:property value="#status.index"/>].sufficeNumber" /></td>
</tr>
</s:iterator>
</table>
</td>
</tr>
后台代码:
private List<InspectCategory> categoryList = new ArrayList<InspectCategory>(); //要显示的所有项
private List<InspectCategory> showList; //默认选中的项