6
我測試ExtJS4,但在這裏需要一些幫助......ExtJS4 - Ext.dom.Element和fireEvent
我有這樣的HTML代碼:
<input type="button" value="Click" id="sendButton">
<input type="text" id="tbox">
而這個腳本代碼:
Ext.addBehaviors({
'#[email protected]': function(){
alert("Test");
}
});
Ext.get('tbox').on('keydown', function(e){
if(e.keyCode == Ext.EventObject.ENTER){
//Ext.select('#sendButton').fireEvent('click');
//Ext.get('sendButton').fireEvent('click');
// this is what I need working....
}
});
我只是想,當你按下輸入文本框,它會像你點擊按鈕。
任何人都可以幫忙嗎?