如何实现网页的自动滚屏显示?
当双击网页的时候,网页将会自动向下滚动,再次单击时滚动停止。将下面的代码插入到<body></body>之间:
<script language="javascript">
var currentpos,timer;
function initialize()
{
timer=setInterval("scrollwindow()",10);
}
function sc()
{
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if(currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</script>