自动滚屏

<html>
<head>
<title>JavaScript特效|自动滚屏</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
font-size: 9pt;
}
td {
font-size: 9pt;
line-height: 165%;
}
-->
</style>
<script language="JavaScript">
<!-- Begin
function scrollit() {
for (I=1; I<=750; I++){
parent.scroll(1,I)
}
}

function scrollit1() {
for (I=750; I>1; I=I-1){
parent.scroll(1,I)
}
}
// End -->
</script>
</head>

<body>
<script language="JavaScript">
                            function click() {
                            if (event.button==2) {
                            if(document.all.auto.status==true){document.all.auto.status=false;alert("自动滚屏已经停止了!")}
                            scroller();
                            }
                            }
                            document.onmousedown=click
                            var position = 0;
                            function scroller() {
                            if (document.all.auto.status==true){
                            position+=300;
                            scroll(0,position);
                            clearTimeout(timer);
                            var timer = setTimeout("scroller()",3000);
                            timer;
                            }
                            else{
                            clearTimeout(timer);
                            }
                            }
                            </script>
                            <script language="JavaScript">
                            <!--
                            function MM_callJS(jsStr) { //v2.0
                            return eval(jsStr)
                            }
                            //-->
                            </script>
                            <div align="right">
                            <input type="checkbox" name="auto" value="on" onClick="MM_callJS('scroller() ; ')" >
                            自动滚屏(右键暂停)</div>

<div align="center">
  <p>
    <input type=button value="向下滚屏" onClick="scrollit()" name="button">
    &nbsp;
    <input type=button value="向上滚屏" onClick="scrollit1()" name="button2">
  </p>
  <table width="100%" border="0" cellspacing="0" cellpadding="3">
    <TR>
      <TD align="center"><SPAN
                              class=unnamed2><FONT
                              color=#ff9900><STRONG>搜索引擎技术及趋势<BR>
        </STRONG></FONT></SPAN></TD>
    </TR>
    <TR>
      <TD valign="top"> <P class=unnamed1>随着因特网的迅猛发展、WEB信息的增加,用户要在信息海洋里查找信息,就象大海捞针一样,搜索引擎技术恰好解决了这一难题(它可以为用户提供信息检索服务)。目前,搜索引擎技术正成为计算机工业界和学术界争相研究、开发的对象。
        </P>
<P><BR>
        </P></TD>
    </TR>
  </table>
  <p>&nbsp; </p>
</div>
</body>
</html>

你可能感兴趣的:(scroller)