方法一: var obj=document.getElementByIdx_x("id"); (獲取某對(duì)象) obj.onclick=function(e){ (定義動(dòng)作) window_open.setPosition(window_open.x,e.clientY-150); (窗口打開(kāi)位置定義) 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(); } }
|