首页 > 编程 > JavaScript > 正文

ext监听事件方法[初级篇]

2019-11-21 01:45:56
字体:
来源:转载
供稿:网友
<script>function a(){alert('some thing');}Ext.onReady(function(){
    Ext.get("btnAlert").addListener("click",a);//这里监听
           //或者使用
           Ext.get("btnAlert").on("click",a);//效果相同
     });</script>
<input id="btnAlert" type="button" value="alert框" />
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表