如何在jsp中编写select Onchange事件以将请求转发给spring mvc controller

时间:2014-06-15 16:43:16

标签: jsp spring-mvc

如何在JSP中编写select Onchange事件以将请求转发给Spring MVC控制器?

1 个答案:

答案 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>