uniGUI学习之ExtJS事件(51)

<link  rel="stylesheet" href="theme-graphite-all.css">
<script src="ext-all.js"></script>   
<script>Ext.onReady(function () { /*----------------------------------------------------------------------------*/

Ext.create(Ext.form.TextField, {
renderTo: Ext.getBody(),  
       id:myTextField,  
});  

Ext.get(myTextField).on(keypress,function(e){
//监听键盘事件
        if(e.charCode==Ext.EventObject.SPACE){
            Ext.Msg.alert(info,空格);
        }
});

Ext.get(myTextField).on(click, function(p){  
                //处理点击事件代码  
document.title="New Title!";
});  

}); </script><!------------------------------------------------------------------------------------------------------->

  

<link  rel="stylesheet" href="theme-graphite-all.css">
<script src="ext-all.js"></script>   
<script>Ext.onReady(function () { /*----------------------------------------------------------------------------*/

Ext.create(Ext.form.TextField, {
        renderTo: Ext.getBody(),  

   enableKeyEvents: true,
   listeners: { keyup: function(src, evt){alert(src.getValue());} }
});  

}); </script><!------------------------------------------------------------------------------------------------------->

 

uniGUI学习之ExtJS事件(51)

上一篇:C/C++的内存泄漏检测工具Valgrind memcheck的使用经历(求大神解答疑惑,找出内存泄露真凶)


下一篇:asp.net mvc框架之EF的使用