对于不同浏览器而言--获取卷曲距离方式可能有所不一样---下面提供三种方式---
scrollTop1 = window.pageYoffset || document.documentElement.scrollTop|| document.body.scrollTop||0; //====
function getScroll() { return { left:window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft ||0, top:window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0 } }