日期:2014-05-17  浏览次数:20556 次

第一次写html,不知道哪错了,希望可以得到大家帮助
HTML code

<html>
    <head>
        <title>CSS Example</title>
    </head>
    <body>        
        <input type="button" onclick="start('abcdefg')"  value="start" />
        <input type="text" id="here" />
        <script type="text/javascript">
            function start(str1) {
                str=str1;
                len=str.length;
                i=0;
                dwrite();
            }
            function dwrite() {
                document.getElementById("here").value=document.getElementById("here").value + str.charAt(i);
                if( i++ ==len ) {
                    i=0;
                    return true;
                }
                    setTimeout("dwrite()",500);
            }
        </script>
    </body>
</html>


在IE8中自带的“开发人员工具”中提示:
对象不支持此操作 index.html 行6 字符1.
另外我想问一下,我用这样的高度方法有没有什么问题,有没有什么更好的高度方法?

------解决方案--------------------
start换个方法名就Ok了