自动滚动到页面底部并从顶部重新开始滚动
<script type="text/javascript">
/*<![CDATA[*/
var a,b,c;
function isAtBottom()
{
a=document.documentElement.scrollHeight;
b=document.documentElement.scrollTop;
c=document.documentElement.clientHeight
return ((a-b)<=c);
}
function doStuff()
{
(isAtBottom())?scrollTo(0,0):scrollBy(0,3);
}
window.onload=function(){
window.setInterval('doStuff()',10);
}
/*]]>*/
</script>
