Because IE and Firefox are different for the current location of the mouse (ie is event.x|y,ff for event.pagex| Y), generally used event.clientx instead of both, but when the scroll bar event.clientx in IE and FF performance will be slightly different. Below see prototype and YUI how to deal with this problem ...
Prototype
Pointerx:function (event) {
return Event.pagex | | (Event.clientx +
(Document.documentElement.scrollLeft | | document.body.scrollLeft));
},
Pointery:function (event) {
return Event.pagey | | (Event.clienty +
(Document.documentElement.scrollTop | | document.body.scrollTop));
},
YUI
Getpagex:function (EV) {
var x = Ev.pagex;
if (!x && 0!== x) {
x = Ev.clientx | | 0;
if (This.isie) {
x + + this._getscrollleft ();
}
}
return x;
},
Getpagey:function (EV) {
var y = ev.pagey;
if (!y && 0!== y) {
y = Ev.clienty | | 0;
if (This.isie) {
Y + + this._getscrolltop ();
}
}
return y;
},
All the same, by determining whether to support an object to determine the browser, and then increase the scrol bias.