【发布时间】:2013-05-21 22:09:32
【问题描述】:
正如标题所说,我正在使用 PhoneGap 运行 Android 4.x。
我不愿意使用 jQuery,所以这里没有 jQuery。
当启用e.preventDefault 时,如何获取touchstart、touchend 和touchmove 的坐标?
【问题讨论】:
标签: javascript cordova touch
正如标题所说,我正在使用 PhoneGap 运行 Android 4.x。
我不愿意使用 jQuery,所以这里没有 jQuery。
当启用e.preventDefault 时,如何获取touchstart、touchend 和touchmove 的坐标?
【问题讨论】:
标签: javascript cordova touch
坐标在e即事件变量中。
var x = e.targetTouches[0].pageX,
y = e.targetTouches[0].pageY;
【讨论】: