标签:style blog color io os ar sp div art
<script> lastScrollY=0; function heartBeat(){ var diffY; if (document.documentElement && document.documentElement.scrollTop) diffY = document.documentElement.scrollTop; else if (document.body) diffY = document.body.scrollTop else {/*Netscape stuff*/} percent=.1*(diffY-lastScrollY); if(percent>0)percent=Math.ceil(percent); else percent=Math.floor(percent); document.getElementById("full").style.top=parseInt(document.getElementById("full").style.top)+percent+"px"; lastScrollY=lastScrollY+percent; } suspendcode="<div id=\"full\" style=‘right:15px;POSITION:absolute;TOP:600px;z-index:100; cursor:pointer;‘><a onclick=‘window.scrollTo(0,0);‘ ><img src=‘./lib/tpl/vector/totop.gif‘></a><br></div>" document.write(suspendcode); window.setInterval("heartBeat()",1); </script>
标签:style blog color io os ar sp div art
原文地址:http://www.cnblogs.com/gordensong/p/4013479.html