struts2中action得到选中的checkbox的值
来源:互联网 发布:人工智能对人类的好处 编辑:程序博客网 时间:2024/06/05 23:55
struts2中得到checkbox的值:
action中得到的是一个字符串,用","隔开。所以在action中定义一个属性值接收checkbox的name,然后拆串即可。
html:
- <input type="checkbox" name="check" value="111">
- <input type="checkbox" name="check" value="222">
- <input type="checkbox" name="check" value="333">
action:
- private String check;
- //getter and setter..
- String ids = this.getCheck();
- System.out.println("ids::"+ids);
- String[] arraycheck = ids.split(", ");
这样action就得到了checkbox的value值。
注意:action为我们取到得数组格式为[val1, val2, val3]的形式,逗号后边带个空格,所以用split拆分字符串的时候参数要传入", "而不是",",否则在遍历该数组的时候,只有val1的值取出是正确的。
- struts2中action得到选中的checkbox的值
- struts2中action得到选中的checkbox的值
- struts2中action得到选中的checkbox的值
- struts2中得到checkbox的值:
- 在 Struts2 的 Action 中获得选中的 checkbox 的 value
- js得到所有选中checkbox的值
- js中得到checkbox标签选中的信息的id
- checkbox ,select,radio,得到选中值,设置显示的值
- treeview 节点循环 得到 被选中的checkbox 值
- 得到选中的checkbox和radio
- Struts2 Action中得到request对象的几种方法.
- 获取repeater 中 checkbox 选中的值
- 在Struts2 的Action中怎样获取表单提交上来的多个checkbox的值
- struts2标签:关于radio,checkbox返回值选中的问题
- action中得到多选框的值
- struts2得到当前action的namespace
- 如何用jquery实现checkbox的全选、反选、取消反选,以及如何得到选中的checkbox的值
- 获取checkbox选中的值
- 软件开发的葵花宝典 (iteye创始人)
- Git使用详细介绍
- c#读取xml文件到datagridview中
- 墨菲法则
- 为SharePoint 2010配置基于表单的身份认证
- struts2中action得到选中的checkbox的值
- C++ STL学习之三:容器deque深入学习
- labview加密分析-2 labview运行方式简介
- asp.net的学习
- C# StreamReader, StrermWriter, Copy, Move, Delete简明用法
- date类的应用
- 男人不得不知的100句话
- loser们的共同特征 转自caoz的和谐blog
- Altium Designer 10 please wait a moment解决方法