scrollTop和scrollLeft的方法
<script src="jquery-1.12.4.js"></script> <script> $(function () { $(window).scroll(function () { console.log($(window).scrollTop()); console.log($(window).scrollLeft()); }); }); </script>
<script src="jquery-1.12.4.js"></script> <script> $(function () { $(window).scroll(function () { console.log($(window).scrollTop()); console.log($(window).scrollLeft()); }); }); </script>