window.setInterval(
function(){
if((document.body.scrollTop+document.body.offsetHeight) < document.body.scrollHeight)
window.scroll(document.body.scrollLeft,document.body.scrollTop+5);
else
window.scroll(0,0);
window.status = document.body.scrollTop + "-->" + document.body.scrollHeight;
},
200
);XX他大丫地,我是来抢分的,刚写了半天,那个帖子里也要抢...

解决方案 »

  1.   

    谢谢你的回复,指点。但还是没有成功实现。我的程序大体如下:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
     <td width="100%" align="left" id="frmTitle" nowrap="true" style="padding-left:20">
      <xsl:element name="iframe">
       <xsl:attribute name="name">frm_tm</xsl:attribute>
       <xsl:attribute name="width">98%</xsl:attribute>
       <xsl:attribute name="height">500</xsl:attribute>
       <xsl:attribute name="id">frm_tm</xsl:attribute>
       <xsl:attribute name="frameborder">0</xsl:attribute>
       <xsl:attribute name="scrolling">no</xsl:attribute>
       <xsl:attribute name="src"><xsl:value-of select='/DIPS_TEST_SHOW/@WEB_SIGN'/>yxk/Englis 900/001.htm</xsl:attribute>
      </xsl:element>
      <script language="javascript">
      function scrollwindow()
      {
    scrollx = frm_tm.document.body.scrollLeft;
    scrolly = frm_tm.document.body.scrollTop;
             scrolly += 1;
    frm_tm.window.scroll(scrollx,scrolly);
       }
       setInterval(scrollwindow,60);
       </script>
     </td>
    </tr>
    </table>src中插的是HTML,路径是活的。目前我是写的固定的。关键是scrollwindow中如何写能实现让scrolly的值变为0后重新在往下滚动。
    麻烦高手看一下。谢谢。
      

  2.   

    不好意思,我试过了。我是用XML写的网页。但你的程序上去,啥都显示不出来了。我照我的程序,把你的程序修改了下:<script language="javascript">
      function scrollwindow()
      {
    scrollx = frm_tm.document.body.scrollLeft;
    scrolly = frm_tm.document.body.scrollTop;
             scrollh = frm_tm.document.body.scrollHeight
             if(scrolly  < scrollh )
    {
    scrolly += 1;
    frm_tm.window.scroll(scrollx,scrolly);
    }
    else
    {
    frm_tm.window.scroll(0,0);
    frm_tm.window.status = frm_tm.document.body.scrollTop ;
    }  
       }
       setInterval(scrollwindow,60);
       </script>
     麻烦你看一下,哪不对