双击滚屏代码

<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>
posted on 2005-11-18 13:29  泽来  阅读(434)  评论(0编辑  收藏  举报