如何使用這個由div來顯示:煎茶觸摸2覆蓋showBy HTML DIV
的Html
JS碼(抽頭被連接到上面的div元素)
tap : function(e) {
overlay = Ext.Viewport.add({
xtype: 'panel',
left: 0,
top: 0,
modal: true,
hideOnMaskTap: true,
hidden: true,
width: 260,
height:'70%',
html: 'STUFF!!',
styleHtmlContent: true,
scrollable: true,
items: [
{
docked: 'top',
xtype: 'toolbar',
title: 'Overlay Title'
}
]
});
overlay.showBy(e.getTarget());
}
然而,這是一場噩夢,我會用e.getTarget()
或e.target
得到這些錯誤,它確實與.show()
一起工作,但它的定位是錯誤的。什麼是正確的方法來做到這一點?
Uncaught TypeError: Object #<HTMLTableCellElement> has no method 'getPageBox'