<script>
//**** 自动滚屏函数,双击下滚,再次双击上滚,单击停止
var currentpos,timer;
var sstep=-2;
function initialize() 
{sstep=-sstep;
 timer=setInterval('scrollwindow()',20);
}
function sc()
{clearInterval(timer);
}
function scrollwindow() 
{currentpos=document.body.scrollTop; 
 window.scroll(0,currentpos+=sstep); 
 if (currentpos != document.body.scrollTop)sc();
}
document.onmousedown=sc;
document.ondblclick=initialize;    var scurrentpos,stimer;
var ssstep=-2;
function sinitialize() 
{ssstep=-ssstep;
 stimer=setInterval('sscrollwindow()',20);
}
function ssc()
{clearInterval(stimer);
}
function sscrollwindow() 
{scurrentpos=subody.document.body.scrollTop; 
 subody.window.scroll(0,scurrentpos+=ssstep); 
 if (scurrentpos != subody.document.body.scrollTop)ssc();
}
subody.document.onmousedown=ssc;
subody.document.ondblclick=sinitialize;</script>

解决方案 »

  1.   

    <html><SCRIPT language=JavaScript> 
    var currentpos,timer; function down() 

    timer=setInterval("scrolldown()",10); 

     
    function sc(){ 
    clearInterval(timer); 

    function scrolldown() 

    currentpos=document.body.scrollTop; 
    window.scroll(0,++currentpos); 
    if (currentpos != document.body.scrollTop) 
    sc(); 

    document.onmousedown=sc 
    document.ondblclick=down 
    </script><head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>双击滚屏-51windows.com</title>
    <style>
    <!--
    body         { color: #FFFFFF; font-family: Verdana; font-size: 9pt }
    -->
    </style>
    </head><body bgcolor="#0496DC"><p align="center">请双击</p>
    <p>1</p>
    <p>2</p>
    <p>3</p>
    <p>4</p>
    <p>5</p>
    <p>6</p>
    <p>7</p>
    <p>8</p>
    <p>9</p>
    <p>10</p>
    <p>1</p>
    <p>2</p>
    <p>3</p>
    <p>4</p>
    <p>5</p>
    <p>6</p>
    <p>7</p>
    <p>8</p>
    <p>9</p>
    <p>10</p>
    <p>1</p>
    <p>2</p>
    <p>3</p>
    <p>4</p>
    <p>5</p>
    <p>6</p>
    <p>7</p>
    <p>8</p>
    <p>9</p>
    <p>10</p>
    <p>1</p>
    <p>2</p>
    <p>3</p>
    <p>4</p>
    <p>5</p>
    <p>6</p>
    <p>7</p>
    <p>8</p>
    <p>9</p>
    <p>10</p>
    <p>1</p>
    <p>2</p>
    <p>3</p>
    <p>4</p>
    <p>5</p>
    <p>6</p>
    <p>7</p>
    <p>8</p>
    <p>9</p>
    <p>10</p></body></html>