From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/document/writeln/index.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 files/zh-cn/web/api/document/writeln/index.html (limited to 'files/zh-cn/web/api/document/writeln') diff --git a/files/zh-cn/web/api/document/writeln/index.html b/files/zh-cn/web/api/document/writeln/index.html new file mode 100644 index 0000000000..aa133ef635 --- /dev/null +++ b/files/zh-cn/web/api/document/writeln/index.html @@ -0,0 +1,25 @@ +--- +title: document.writeln +slug: Web/API/Document/writeln +translation_of: Web/API/Document/writeln +--- +

{{ ApiRef() }}

+

概述

+

向文档中写入一串文本,并紧跟着一个换行符。

+

语法

+
document.writeln(line);
+
+

参数

+ +

示例

+
document.writeln("<p>enter password:</p>");
+
+

备注

+

document.writelndocument.write 一样,但是会添加一个换行符。

+
+ Note: document.writeln (like document.write) does not work in XHTML documents (you'll get a "Operation is not supported" (NS_ERROR_DOM_NOT_SUPPORTED_ERR) error on the error console). This is the case if opening a local file with a .xhtml file extension or for any document served with an application/xhtml+xml MIME type. More information is available in the W3C XHTML FAQ.
+

规范

+

writeln

+

{{ languages( { "ja": "ja/DOM/document.writeln", "pl": "pl/DOM/document.writeln" } ) }}

-- cgit v1.2.3-54-g00ecf