一种打字效果代码:

<html>
<head>
    <title>打字机效果</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script>
        var msg = "1.数据管理系统,数据处理系统, 数据安全监控系统(实现对数据库容量和服务器运行状态信息的监控)的改造 n   2.地图服务器,二维地图发布系统,三维地图发布系统了解、布署——n   3.整体数据准备(影像 及 矢量数据) 切图 发布——n   4.地图发布配置工具——"
        var len = msg.length
        var seq = 0
        var speed = 300
        function type() {
            content.innerText = msg.substring(0, seq)
            if (seq == len) { seq = 0 }
            else
                seq++
            setTimeout("type()", speed)
        }

    </script>
    <meta content="MSHTML 6.00.3790.186" name="GENERATOR">
</head>
<body onload="type()">
    <div id="content">
    </div>
</body>
</html>

说明: 换行用js 中的  n, 代码简单

效果截图:

image

第二种效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>打字机效果2 – 分享JavaScript-sharejs.com</title>
    <style type="text/css">
        body
        {
            font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
            margin-top: 0px;
            background-image: url(‘../../images/heading3.gif’);
            background-repeat: no-repeat;
        }
        #myContent, #myContent blink
        {
            width: 100%;
            height: 100%;
            background: ffffff;
            color: #00FF00;
            font-family: courier;
        }
       
       
        blink
        {
            display: inline;
        }
    </style>
    <script type="text/javascript">

        var charIndex = -1;
        var stringLength = 0;
        var inputText;
        function writeContent(init) {
            if (init) {
                inputText = document.getElementById(‘contentToWrite’).innerHTML;
            }
            if (charIndex == -1) {
                charIndex = 0;
                stringLength = inputText.length;
            }
            var initString = document.getElementById(‘myContent’).innerHTML;
            initString = initString.replace(/<SPAN.*$/gi, "");

            var theChar = inputText.charAt(charIndex);
            var nextFourChars = inputText.substr(charIndex, 4);
            if (nextFourChars == ‘<BR>’ || nextFourChars == ‘<br>’) {
                theChar = ‘<BR>’;
                charIndex += 3;
            }
            initString = initString + theChar + "<SPAN id=’blink’>_</SPAN>";
            document.getElementById(‘myContent’).innerHTML = initString;

            charIndex = charIndex / 1 + 1;
            if (charIndex % 2 == 1) {
                document.getElementById(‘blink’).style.display = ‘none’;
            } else {
                document.getElementById(‘blink’).style.display = ‘inline’;
            }

            if (charIndex <= stringLength) {
                setTimeout(‘writeContent(false)’, 150);
            } else {
                blinkSpan();
            }
        }

        var currentStyle = ‘inline’;
        function blinkSpan() {
            if (currentStyle == ‘inline’) {
                currentStyle = ‘none’;
            } else {
                currentStyle = ‘inline’;
            }
            document.getElementById(‘blink’).style.display = currentStyle;
            setTimeout(‘blinkSpan()’, 500);

        }
    </script>
</head>
<body>
    <div id="myContent">
    </div>
    <div id="contentToWrite" style="display: none">
        1.kqProCis Cis数据管理系统,KqProTools 数据处理系统, kqMonitor 数据安全监控系统(实现对数据库容量和服务器运行状态信息的监控)的改造——
        <br />
        2.地图服务器,二维地图发布系统,三维地图发布系统了解、布署——
        <br />
        3.整体数据准备(影像 及 矢量数据) 切图 发布——、
        <br />
        4.地图发布配置工具——
        <br />
    </div>
    <script type="text/javascript">
        writeContent(true);
    </script>
</body>
</html>

说明: 这种可以使用HTML代码, 定制性更高,推荐

截图:

image


PS:推荐第二种效果,定制性更高