zoukankan      html  css  js  c++  java
  • Extjs 中的添加事件总结

    a、使用addListeners:
            addListener( String eventName, Function fn, Object scope, Object options ) 
            panel.addListeners('click',function(){alert('点击事件')},this);

        b、使用addEvents自定义事件:
            addEvents(Object o)
            panel.addEvents({"eventName":true})

            激活事件
            fireEvent( String eventName, Object... args ) : Boolean
            panel.fireEvent("eventName",this);

        c、使用on:
            on( String eventName, Function handler, Object scope, Object options ) 
            panel.on('click',function(){alert('点击事件')},this);

        d、使用listeners属性:
            listaners : {'click' : function(){alert('点击事件')}}    
        e、使用handler属性(此属性不一定是所有控件都有):
            handler : function(){/*事件处理*/}

  • 相关阅读:
    Kubernetes服务目录的设计
    浅谈移动边缘计算
    kubernetes源码分析 -- kube-proxy
    openstack dpdk
    KVM irqfd and ioeventfd
    dpdk CUSE
    《springboot实战》丁雪峰翻译 笔记
    photoshop
    office word使用
    baidu地图api使用
  • 原文地址:https://www.cnblogs.com/lidabo/p/2917880.html
Copyright © 2011-2022 走看看