动感Loading文字

<html>
<head>
    <title>动感Loading文字</title>
    <script language="javascript">
        <!--
        text = "Loading...";
        i = 0;

        function flash() {
            str = text.charAt(i);
            str = "<b>" + str + "</b>";
            leftStr = text.substr(0, i);
            rightStr = text.substr(i + 1, text.length - i);
            txt.innerHTML = leftStr + str + rightStr;
            i++;
            if (i >= text.length) i = 0;
            setTimeout("flash()", 500);
        }

        //-->
    </script>
</head>
<body onLoad="flash()">
<div id="txt" style="font-size:28px;font-family:Arial">
</div>
</body>
</html>

  

posted @ 2018-09-12 11:53  164537268  阅读(125)  评论(0编辑  收藏  举报