在回调函数里用:
event = event||window.event;
var pageX = event.pageX;
var pageY = event.pageY;
if(pageX==undefined){
pageX = event.clientX + (document.body.scrollLeft || document.documentElement.scrollLeft);
}
if(pageY==undefined){
pageY = event.clientY + (document.body.scrollTop || document.documentElement.scrollTop);
}
return {x:pageX,y:pageY};