javascript全局对象

一、Array

二、Boolean

三、Date

四、Error

五、EvalError

六、Function

七、JSON

八、Math

九、Number

十、Object

十一、RangeError

十二、ReferenceError

十三、RegExp

十四、String

十五、SyntaxError

十六、TypeError

十七、URIError

document.write()方法与document.writeln()方法有什么不同呢?

  在浏览器上我们看不出来,但是在源代码里,document.writeln()生成的代码是会自动换行的。

复制代码
    <script type="text/javascript">
        window.onload = function () {
            document.write("write");
            document.write("write");

            document.writeln("writeln");
            document.writeln("writeln");
        }
    </script>
复制代码

原文地址:https://www.cnblogs.com/mingxuantongxue/p/3889672.html