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/ja/web/api/document/writeln/index.html | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 files/ja/web/api/document/writeln/index.html (limited to 'files/ja/web/api/document/writeln/index.html') diff --git a/files/ja/web/api/document/writeln/index.html b/files/ja/web/api/document/writeln/index.html new file mode 100644 index 0000000000..613308e98e --- /dev/null +++ b/files/ja/web/api/document/writeln/index.html @@ -0,0 +1,66 @@ +--- +title: Document.writeln() +slug: Web/API/Document/writeln +tags: + - API + - DOM + - Method + - Reference + - メソッド +translation_of: Web/API/Document/writeln +--- +

{{ ApiRef("DOM") }}

+ +

テキストの文字列とその直後に続く改行文字を文書に書き込みます。

+ +

構文

+ +
document.writeln(line);
+
+ +

引数

+ + + +

Example

+ +
document.writeln("<p>パスワードを入力してください:</p>");
+
+ +

メモ

+ +

document.writeln は {{domxref("document.write")}} と同じですが、改行文字を追加します。

+ +
メモ: document.writeln は (document.write と同様に) XHTML 文書では動作しません (エラーコンソールに "Operation is not supported" [NS_ERROR_DOM_NOT_SUPPORTED_ERR] エラーが表示されます)。これは、 .xhtml の拡張子を持つローカルファイルを開いたり、何らかの文書が application/xhtml+xml の MIME タイプで提供されたときに発生します。詳細は W3C XHTML FAQ で確認することができます。
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("HTML WHATWG", "#dom-document-writeln", "document.writeln()")}}{{Spec2("HTML WHATWG")}} 
{{SpecName("DOM2 HTML", "html.html#ID-35318390", "document.writeln()")}}{{Spec2("DOM2 HTML")}} 
+ +

ブラウザーの対応

+ + + +

{{Compat("api.Document.writeln")}}

-- cgit v1.2.3-54-g00ecf