需求:当combobox内的值发生改变,启动change事件。
网站:http://www.jeasyui.com/documentation/index.php#
前端页面代码:php
<input name="benc" id="benc" class="easyui-combobox" style="width: 250px;" data-options="editable:false,panelHeight:'auto',valueField:'v', textField:'t',data:[{v: '0',t: '未加密'},{v: '1',t: '加密'}]" value="0" />
js代码:css
$(function(){ $('#benc').combobox({ onChange:function(n,o){ if(n==1){ $('#pwd').css({'display':'table-row'}); }else{ $('#pwd').css({'display':'none'}); } } }); });