当前位置: 代码迷 >> Java Web开发 >> 请教jsp的combox的联动有关问题
  详细解决方案

请教jsp的combox的联动有关问题

热度:53   发布时间:2016-04-17 12:49:45.0
请教jsp的combox的联动问题
<td   class= "TEXT4 "> 飯店名
<logic:present   name= "CMB_SEARCH_LIST_SESSION ">
<bean:define   id= "resultList "   name= "CMB_SEARCH_LIST_SESSION "   />

<html:select   property= "hanId "   style= "width:130px; "   onchange= "ryoriSelect() ">
<html:options   collection= "resultList "   labelProperty= "hanTen "   property= "hanId "> </html:options>
</html:select>
</logic:present>
</td>
在combox中定义了onchange事件,但是触发.do返回页面的时候combox默认的是第一个选项,而不是刚才选择的选项,这个问题如何解决?

------解决方案--------------------
<html:select property= "hanId " style= "width:130px; " onchange= "ryoriSelect() ">
<html:options collection= "resultList " labelProperty= "hanTen " property= "hanId "> </html:options>
两个property一样?
------解决方案--------------------
昏,还没出来啊...

<html:select property= "hanId " style= "width:130px; " onchange= "ryoriSelect() " value= "hanId ">
<html:options collection= "resultList " labelProperty= "hanTen " property= "hanId "> </html:options>