我正在尝试将HTLM5转换为iOS移动版,使用触摸而不是鼠标来播放。以与onmousemove
相同的方式访问触摸的最佳方式是什么?
鼠标代码:
document.onmousemove = function(e){
if (player.X + c.offsetLeft > e.pageX) {
player.moveLeft();
} else if (player.X + c.offsetLeft < e.pageX) {
player.moveRight();
}
}