日期:2014-05-16 浏览次数:20344 次
window.setTimeout(BackToIndex,20000);
var X,Y,X1,Y1;
function BackToIndex()
{
var mousePos = mousePosition(ev);
X1 = mousePos.x;
Y1 = mousePos.y;
if(X!=X1 && Y!=Y1){
location.href="index.html";
}
}
function mousePosition(ev){
if(ev.pageX
------解决方案--------------------
ev.pageY){
return {x:ev.pageX, y:ev.pageY};
}
return {
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
y:ev.clientY + document.body.scrollTop - document.body.clientTop
};
}
function mouseMove(ev){
ev = ev
------解决方案--------------------
window.event;
var mousePos = mousePosition(ev);
X = mousePos.x;
Y = mousePos.y;
}
document.onmousemove = mouseMove;