textbox添加清除按钮,查找按钮,绑定keyup

清除按钮:

<input id="Tk_jsxm"  class="easyui-textbox" style="width:20%;"
                            data-options="prompt:'输入教师姓名查找',icons:[{
                                                                        iconCls:'icon-remove',
                                                                        handler: function(e){
                                                                            $(e.data.target).textbox('setValue','');
                                                                        }
                                                                    }]" placeholder="输入教师姓名查找">

查找按钮:

icons:[{

iconCls:'icon-search',

handler: function(e){

var v = $(e.data.target).textbox('getValue');

alert('The inputed value is ' + (v ? v : 'empty'));

}

}]

 

绑定kuyup事件:(最终因为获得的值有bug,改采用jquery原keyup)

$("#Tk_jsxm").textbox('textbox').bind('keyup', function(){
            alert(000)
        });


posted on 2018-08-30 09:35  IDVD  阅读(195)  评论(0编辑  收藏  举报

导航