easyui 界面中输入框(textbox)和下拉框(combobx)的onchange事件

来源:互联网 发布:字符数组结束标志 编辑:程序博客网 时间:2024/06/05 06:32

对于textbox的触发事件的写法

 <input name="material_name" id="material_name" class="easyui-textbox" label="物料名称:" style="width:46%" required="true" labelAlign="center"  labelWidth="110" >

一般情况下,对于输入标签的事件可以这么写

1$("#material_name").onchange(function(){    alert("message");});
但是在easyui中,将原本的标签封装了起来,不再是我们看到的那个标签,所以就不在起作用

对于easyui中的标签的textbox的触发事件可以这么写:

 $('#material_name').textbox('textbox').bind('change', function() {            alert(1);        });

对于下拉框combobox的onchange触发事件

$('#material_code').combobox({            onChange: function(){                alert(1);            }        });


原创粉丝点击