方法一: var obj=document.getElementByIdx_x("id"); (获取某对象) obj.onclick=function(e){ (定义动作) window_open.setPosition(window_open.x,e.clientY-150); (窗口打开位置定义) window_open.show(); 方法二: { xtype:'button', handler:function(pbtn,e){ var window_open = Ext.getCmp('window_id'); window_open.setPosition(window_open.x,e.browserEvent.clientY-150); window_open.show(); } }
|