<script type="text/javascript">
// 卷动事件
onscroll = function() {
// console.log(document.documentElement.scrollTop);
// console.log(document.body.scrollTop);
var scrollTop = document.documentElement.scrollTop || doucument.body.scrollTop;
console.log(scrollTop);
}
</script>
转载于:https://www.cnblogs.com/lxystar/p/10213937.html