<form name="myForm" action="execelFile.do?op=ExeFile" method="post">
<select name="type">
<option value="0">管理员</option>
<option vlaue="1">普通会员</option>
</select>
<input type="radio" name="user.sexId" value="0" checked="checked"/>男
<input type="radio" name="user.sexId" value="1"/>女
</form>
如何在action中获取到select和radio选中的值?
<select name="type">
<option value="0">管理员</option>
<option vlaue="1">普通会员</option>
</select>
<input type="radio" name="user.sexId" value="0" checked="checked"/>男
<input type="radio" name="user.sexId" value="1"/>女
</form>
如何在action中获取到select和radio选中的值?
解决方案 »
- JdbcTemplate中的有些方法为什么不能用?
- 我想自己写个struts1的程序
- valuelist不支持in查询
- 有使用WebLogic Platform 8.1的吗 请教几个问题 谢谢了
- 关于jsp中布局问题????????????????????????????????????????????????
- 我在windows下编写的struts应用程序能不能在linux下使用
- struts 数据传递的问题!!!
- 在weblogic下建sqlserver的连接池
- weblogic6.1 下部署entitybean出错,请帮忙,再线等呢?多少分都行,只要俺够
- jbuild5.0+ias生成的EJB是不是不能直接在weblogic下使用?
- 在poi生成excel页眉
- 用Myeclipse,包名上有小红叉,但是包中的类没有错误
<select name="user.type">
<option value="0">管理员</option>
<option vlaue="1">普通会员</option>
</select>
<input type="radio" name="user.sexId" value="0" checked="checked"/>男
<input type="radio" name="user.sexId" value="1"/>女
</form>
在action定义private User user;要添加get、set方法,这样action得到的user对象中就有了type、sexId等属性的值了
private User user;
private Integer type; public User getUser() {
return user;
} public void setUser(User user) {
this.user = user;
} public Integer getType() {
return type;
} public void setType(Integer type) {
this.type = type;
}