* 取得鼠标坐标
* @return Position
*/
function getMouseLocation(){
if(ns4||ns6){
mouseX = e.pageX;
mouseY = e.pageY;
}
else{
mouseX = event.x + document.body.scrollLeft;
mouseY = event.y + document.body.scrollTop;
}
return {x:mouseX,y:mouseY};
}
在strict下document.body要改成document.documentElement 猜你喜欢