方法一: 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(); } }
|