<script type="text/javascript"> if (localStorage.pagecount) { localStorage.pagecount=Number(localStorage.pagecount) +2; }else { localStorage.pagecount=1; }document.write("Visits: " + localStorage.pagecount + " time(s)."); </script> 鼠标滚动事件 window.onscroll = function(){ var t = document.documentElement.scrollTop || document.body.scrollTop; //t的值为滚动的页面top像素 } }