var ele = document.elementFromPoint(touch.pageX, touch.pageY); //根据坐标直接返回元素document.elementFromPoint()
eg:
$("ul li").on("touchmove touchstart", function(e) {
event.preventDefault();
e = e || window.event;
var touch = e.originalEvent.targetTouches[0];
var ele = document.elementFromPoint(touch.pageX, touch.pageY);
});
时间: 2024-10-11 11:28:02