尝试layerX,layerY
var x = (e.offsetX === undefined) ? e.layerX : e.offsetX; var y = (e.offsetY === undefined) ? e.layerY : e.offsetY;