EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Stefan B. on October 31, 2014, 08:11:54 AM



Title: How can i call an action on an "textbox" if the user press "Enter"?
Post by: Stefan B. on October 31, 2014, 08:11:54 AM
On "Combo" is an key handler defined.
But why not on an "textbox"?

How can i call an action on an "textbox" if the user press "Enter"?


Title: Re: How can i call an action on an "textbox" if the user press "Enter"?
Post by: stworthy on October 31, 2014, 09:16:25 AM
You can call 'textbox' method to get the inputing box and bind any events on it.
Code:
$('#tt').textbox('textbox').bind('keydown', function(e){
//...
});