页面刷新, 定位, 动态下拉框

function getScrolling() {
var x = 0; var y = 0;
if (document.body && document.body.scrollLeft && !isNaN(document.body.scrollLeft)) {
x = document.body.scrollLeft;
} else if (window.pageXOffset && !isNaN(window.pageXOffset)) {
x = window.pageXOffset;
}
if (document.body && document.body.scrollTop && !isNaN(document.body.scrollTop)) {
y = document.body.scrollTop;
} else if (window.pageYOffset && !isNaN(window.pageYOffset)) {
y = window.pageYOffset;
}
return x + "," + y;
}

你可能感兴趣的:(页面刷新, 定位, 动态下拉框)