<select name="secno" id="secno" onchange="alert('1');" class="easyui-combobox" style="width:170px;" data-options="required:true" >
       
        <c:forEach items="${requestScope.tsections}" var="tsection">
         <option value="${tsection.secno}">${tsection.secname}</option>
        </c:forEach>
        </select>
    onchange事件一直不会被促发,这是怎么回事啊?我有用到easyui,和这个有关吗?select标签onchange事件

解决方案 »

  1.   

    显然会的  可能是其他方面的错误吧   你用firebug看看有没有报错
      

  2.   

    你看下最后生成的html ,是不是有错误,或者 调试工具调试了。
      

  3.   

    easyui重新生成了另外一个模拟select功能的对象了,你操作不在是原来的select,当然不会触发,要配置combobox的事件<select name="secno" id="secno" onchange="alert('1');" class="easyui-combobox" style="width:170px;" data-options="required:true,onSelect:function(rec){alert(123)}" >
           
            <c:forEach items="${requestScope.tsections}" var="tsection">
             <option value="${tsection.secno}">${tsection.secname}</option>
            </c:forEach>
            </select>