CRM-对列表元素进行多个选择
2015-09-22 09:59
417 查看
CRM-对列表元素进行多个选择
效果:function doSelectAll(){ //prop jquery 1.6+建议使用 $("input[name=selectedRow]").prop("checked", $("#selAll").is(":checked")); } <table width="100%" border="0"> <tr class="t_tit"> <td width="30" align="center"><input type="checkbox" id="selAll" onclick="doSelectAll()" /></td> <td width="140" align="center">用户名</td> <td width="140" align="center">帐号</td> <td width="160" align="center">所属部门</td> <td width="80" align="center">性别</td> <td align="center">电子邮箱</td> <td width="100" align="center">操作</td> </tr> <s:iterator value="userList" status="st"> <tr <s:if test="#st.odd">bgcolor="f8f8f8"</s:if> > <td align="center"><input type="checkbox" name="selectedRow" value="<s:property value='id'/>" /></td> <td align="center"><s:property value="name"/></td> <td align="center"><s:property value="account"/></td> <td align="center"><s:property value="dept"/></td> <td align="center"><s:property value="gender?'男':'女'"/></td> <td align="center"><s:property value="email"/></td> <td align="center"> <a href="javascript:doEdit('<s:property value='id'/>')">编辑</a> <a href="javascript:doDelete('<s:property value='id'/>')">删除</a> </td> </tr> </s:iterator> </table> 数据提交时,action的处理: public abstract class BaseAction extends ActionSupport { protected String[] selectedRow; public String[] getSelectedRow() { return selectedRow; } public void setSelectedRow(String[] selectedRow) { this.selectedRow = selectedRow; } } 可以得出一个结论, 对于提交数据时多个重名的name会构成一个数组进行封装。???
相关文章推荐
- 【图像处理笔记】锐化空间滤波器
- Android+Eclipse+JNI+javah 自动生成.h文件
- 今天开始决定写写博
- 渐进增强和优雅降级之间的不同
- Xcode事件十问
- JQuery的最全的追加方法
- postgres-xl 基于pgxc_ctl搭建安装
- 【图像处理笔记】平滑空间滤波器
- (2015秋) 作业3:结对编程(总分100分)
- oracle11g asm standalone 单实例重建
- iOS生成PDF的关键代码-备忘
- vb.net 发布失败
- web项目部署到自己的Tomcat总是不成功
- 前端交付获取图片截取效果,后端处理图片
- LeetCode -- Sort Colors
- iOS中3种基础的数据持久化模式
- Mysql导入大表文件时注意修改参数
- 有关流Stream
- 校园讲座小记
- Spinner类setSelection执行流程源码解析