extjs中box图片加事件 ╰+哭是因爲堅強的太久メ 2022-09-20 05:44 108阅读 0赞 在box上直接加listeners 然后加click , focus等事件是不起作用的 添加render事件是起作用的 所以只能在render的时候添加别的事件 { xtype : "box", fieldLabel : "主图", autoEl : { id : "imgurlpath_u", tag : "img", src : "images/withOutPic.jpg" }, anchor : "90%", height : 120, listeners : { render : function() { Ext.fly(this.el).on("click",function() { alert(123); }); Ext.fly(this.el).on(....同上); } } }
还没有评论,来说两句吧...