//要先给文本框手动赋值之后才可以获取正确的文本框内容 var t = $('#tt'); t.textbox('textbox').bind('keydown', function(e){ if (e.keyCode == 13){ // when press ENTER key, accept the inputed value. t.textbox('setValue', $(this).val()); //手动赋值 } });
关于EasyUI TextBox的事件好像不多,像keypress,keydown在textbox的事件里都没有,所以要用这些事件要采取一些特殊的方法,今天用到了这些就记录一下,有两种方法 方法1: var t = $('#txtPwd'); t.textbox('textbox').bind('keypress', function (e) { if (e.keyCode == 13) { // when press ENTER key, accept the inputed value. /
TextBox Extend from $.fn.validatebox.defaults. Override defaults with $.fn.textbox.defaults. The TextBox component is a enhanced input field that allows users build their form easily. It is the base component for building other complex components suc