让页面自动滚动

<script type="text/javascript"> 
<!--
var kj=1;
var is_max=1;
var currentpos,timer;
 
function sc()
{
	clearInterval(timer);
}
 
function initialize()
{
	timer=setInterval("scrollwindow()",10);
}
 
function scrollwindow()
{
	currentpos=document.body.scrollTop;window.scroll(0,++currentpos);
}
 
document.onmousedown=sc
document.ondblclick=initialize
//-->
</script>

你可能感兴趣的:(JavaScript)