这种方法不行:

$("#tt").textbox('textbox').click(function(){
console.info(123);
});

直接报错
Uncaught TypeError: Cannot read property 'textbox' of undefined

 参考:https://www.jeasyui.com/forum/index.php?topic=5569.0

 

$(document).ready(function(){
var t = $('#write_input');
t.textbox('textbox').bind('keydown', function(e){
if (e.keyCode == 13){ // when press ENTER key, accept the inputed value.
t.textbox('setValue', $(this).val());
}
});
})

 注意要写在$(document).ready() block

另外passwordbox也同样使用textbox方法