Struts2中怎样把select中的值传到Action
页面中<selectname="select"onchange="window.location='account.action?action=selectAccount...
页面中
<select name="select" onchange="window.location='account.action?action=selectAccountByState&select='+this.value">
<option value="-1" selected="selected">全部</option>
<option value="0">禁用</option>
<option value="1">启用</option>
</select>
action中
private int select;
public void setId(int id) {
this.id = id;
}
public double getMoney() {
return money;
}
为什么我获取的select总是0, 展开
<select name="select" onchange="window.location='account.action?action=selectAccountByState&select='+this.value">
<option value="-1" selected="selected">全部</option>
<option value="0">禁用</option>
<option value="1">启用</option>
</select>
action中
private int select;
public void setId(int id) {
this.id = id;
}
public double getMoney() {
return money;
}
为什么我获取的select总是0, 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询