Javascript 如何确定具有层的页面在touchend上接触的元素
到目前为止,我还无法提供后续问题,因此我将打开一个新问题。我想在touchend下获取与touchstart不同的元素,但是我的页面中有绝对定位的元素,并且函数Javascript 如何确定具有层的页面在touchend上接触的元素,javascript,touch-event,Javascript,Touch Event,到目前为止,我还无法提供后续问题,因此我将打开一个新问题。我想在touchend下获取与touchstart不同的元素,但是我的页面中有绝对定位的元素,并且函数document.elementFromPoint会不断返回我的背景元素,而不是它前面的每个元素。如何获取被触摸的实际元素?e.target指向什么?e.target指向id为“play”的锚定标记document.element frompoint然后指向id为“background”的div,即使myontouchend也出现在“pl
document.elementFromPoint
会不断返回我的背景元素,而不是它前面的每个元素。如何获取被触摸的实际元素?e.target指向什么?e.target
指向id为“play”的锚定标记document.element frompoint
然后指向id为“background”的div,即使myontouchend
也出现在“play”上。