zoukankan      html  css  js  c++  java
  • 控制文字动态输出

    <!doctype html>
    <html>
    <head>
    <meta charset="gb2312">
    
    <title>控制文字动态输出</title>
    
    </head>
    
    <body>
    
    
    <input  type="text" id="fswt_nr" class="fl" placeholder="请输入您的问题" name="tel">
    
    <script>
    
        var index=0;
        var str=document.getElementById("fswt_nr").placeholder;
        function type(){
        if(index==str.length+1){
            index=0;
        }
        document.getElementById("fswt_nr").placeholder = str.substring(0,index++);
        }
        setInterval(type, 500);
        
    
    </script>
    
    <p></p>
    <p></p>
    <p></p>
    <p></p>
    
    <p id="ddff">The furthest distance in the world.Is not between life and death.But when I stand in front of you.Yet you don't know that I love you</p>
    
    
    <script>
    
        var two=0;
        var strtwo=document.getElementById("ddff").innerHTML;
        function typetwo(){
        if(two==strtwo.length+1){
            two=0;
        }
        document.getElementById("ddff").innerHTML = strtwo.substring(0,two++);
        }
        setInterval(typetwo, 500);
        
    
    </script>
    
    
    
    
    
    </body>
    </html>
  • 相关阅读:
    mybatis2入门程序
    mybatis1
    mybeats与jdbc问题分析
    mysqljdbc简单连接释放
    jdbc问题记录
    section,article,div
    HB调试前端开发移动
    HTML,XML,XHTML
    访问地图
    OAuth
  • 原文地址:https://www.cnblogs.com/linyusong/p/9241819.html
Copyright © 2011-2022 走看看