传递值onchange选择Struts1

时间:2018-06-13 20:22:19

标签: jsp struts

我在JSP上有以下选择

  <bean:define name="forma_rec_gruposGlosas" id="idComboArea" property="comboArea" />
    <html:select property="area" styleId="area" onblur="FondoSinFoco();" onchange="update_onChange(this.value);">
        <html:options collection="idComboArea" property="id" labelProperty="description" />
</html:select>

所以我想要的是将select中选择的值传递给onchange部件上的函数update_onChange

1 个答案:

答案 0 :(得分:0)

使用struts-bean标记库-

<%@ taglib uri="/WEB-INF/taglib/struts-bean.tld" prefix="bean"%>

update_onChange('<bean:write name="forma_rec_gruposGlosas" property="id"/>');

在您的onchange事件中

function update_onChange(id){
 // your code here
}