var touch = e.touches[0],
x = touch.pageX - target_offset_x,
y = touch.pageY - target_offset_y;
ctx.beginPath();
ctx.arc(x,y, radius, 0, Math.PI*2, true);
ctx.fill();
}
}
})();
scratchGame.init();
</script>
</body>
</html>
--------------------------------------分割线 --------------------------------------
HTML5 地理位置定位(HTML5 Geolocation)原理及应用
--------------------------------------分割线 --------------------------------------