zoukankan      html  css  js  c++  java
  • JS实现定时循环上翻

    <html>
    <body>
    <DIV align="center" id="icefable2">
    <table width='472' border='0' cellpadding='0' cellspacing='0'>
    <tr><td height='113'>QQQQQQQQQQQQQQQQQQQQQQQq</td></tr>
    <tr><td height='113'>KKKKKKKKKKKKKKKKKKKKKKKK</td></tr>
    </table>
    </div>
    <Script language="JavaScript">
     marqueesHeight
    =113;
      stopscroll1
    =false;
      
    with(icefable2){
       style.width
    =0;
       style.height
    =marqueesHeight;
       style.overflowX
    ="visible";
       style.overflowY
    ="hidden";
       noWrap
    =true;
       onmouseover
    =new Function("stopscroll1=true");
       onmouseout
    =new Function("stopscroll1=false");
      }
      preTop1
    =0; currentTop1=113; stoptime1=0;
      icefable2.innerHTML
    +=icefable2.innerHTML;


    function init_srolltext(){
      icefable2.scrollTop
    =0;
      setInterval(
    "scrollUp1()",2);
    }init_srolltext();

    function scrollUp1(){
      
    if(stopscroll1==truereturn;
      currentTop1
    +=1;
      
    if(currentTop1==114)
      {
       stoptime1
    +=1;
       currentTop1
    -=1;
       
    if(stoptime1==300)
       {
        currentTop1
    =0;
        stoptime1
    =0;
       }
      }
      
    else {
       preTop1
    =icefable2.scrollTop;
       icefable2.scrollTop
    +=1;
       
    if(preTop1==icefable2.scrollTop){
         icefable2.scrollTop
    =113;
         icefable2.scrollTop
    +=1;

       }
      }
    }
    //-->
    </script>
    </body>
    </html>
  • 相关阅读:
    CSS选择器
    HTML2
    html
    http协议
    python--Selectors模块/队列
    Linux系统管理02----目录和文件管理
    Linux系统管理01-----系统命令
    02作业 linux第一章和第三章命令
    01作业 Linux系统管理应用
    01:计算机硬件组层与基本配置------02计算机系统硬件核心知识
  • 原文地址:https://www.cnblogs.com/ding0910/p/512120.html
Copyright © 2011-2022 走看看