如何在JSP中编写select Onchange事件以将请求转发给Spring MVC控制器?
答案 0 :(得分:0)
在jsp中,在组合框上添加如下所示的onchange事件
<spring:form method="POST" modelAttribute="something">
<spring:select path="code" onchange="this.form.submit();" >
.......<spring:option>...</spring:option>
</spring:select>
</spring:form>