【问题标题】:<form:select capture the code in spring MVC 3.2.8<form:select 捕获spring MVC 3.2.8中的代码
【发布时间】:2016-12-09 14:40:35
【问题描述】:

我的 Spring Web 模型-视图-控制器 (MVC) 框架中有这个类。 Spring Web 模型-视图-控制器 (MVC) 框架的版本是 3.2.8。

我的 JSP 中有这个:

<script>
    function newWindowLocationAssign(cbCode) {
        alert (cbCode);
    }

</script>

<form:select path="cbCode" id="cbCode" 
items="${cbList}" itemValue="code" 
itemLabel="code" cssStyle="width: 150px"
onchange="javascript:newWindowLocationAssign(this.code);" />

但警报消息为空!

【问题讨论】:

    标签: html spring-mvc


    【解决方案1】:

    试试这个

    <form:select path="cbCode" 
                                                                 id="cbCode"
                                                                 items="${cbList}" 
                                                                 itemValue="code" 
                                                                 itemLabel="code"
                                                                 cssStyle="width: 150px"
                                                                 onchange="javascript:newWindowLocationAssign(this.value);" 
                                                                 />
    

    【讨论】:

      猜你喜欢
      • 2017-12-15
      • 1970-01-01
      • 1970-01-01
      • 2017-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-15
      • 2013-06-17
      相关资源
      最近更新 更多