scrollTop获取不到值的解决方法 一般都是页面上有html头部标准文件DOCTYPE 解决方法如下,可以去掉DOCTYPE 或者document.documentElement.scrollTop来获取