1. 程式人生 > >表單提示字符如何一個一個的出來

表單提示字符如何一個一個的出來

如何 hellip tin -s mage substr shu size col

<input id=‘qingshuo‘ type=‘text‘ placeholder=‘請輸入您要咨詢的問題……‘ />
<script>
$(function(){
    var input_hz=0;
    var input_hz1=document.getElementById("qingshuo").placeholder;
    function type(){
        if(input_hz==input_hz1.length+1){
            input_hz=0;
        }
        document.getElementById(
"qingshuo").placeholder = input_hz1.substring(0,input_hz++); } setInterval(type, 300); }) </script>

技術分享圖片

技術分享圖片

效果圖

表單提示字符如何一個一個的出來