blob: 658192410529cfd98af9aca7ee67e02f826ff3be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
---
title: Document.writeln()
slug: Web/API/Document/writeln
translation_of: Web/API/Document/writeln
---
<p>{{ ApiRef("DOM") }}</p>
<p>Schreibt eine Textfolge, gefolgt von einem Zeilenumbruchzeichen, in ein Dokument.</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="eval notranslate">document.writeln(<em>line</em>);
</pre>
<h3 id="Parameters" name="Parameters">Parameters</h3>
<ul>
<li><code>line</code> ist eine Zeichenfolge welche eine Textzeile enthält.</li>
</ul>
<h2 id="Example" name="Example">Beispiel</h2>
<pre class="notranslate">document.writeln("<p>enter password:</p>");
</pre>
<h2 id="Notes" name="Notes">Notes</h2>
<p><strong>document.writeln</strong> ist dasselbe wie {{domxref("document.write")}} aber fügt einen Zeilenumbruch hinzu.</p>
<div class="note"><strong>Note:</strong> <strong>document.writeln</strong> (like <strong>document.write</strong>) does not work in XHTML documents (you'll get a "Operation is not supported" (<code>NS_ERROR_DOM_NOT_SUPPORTED_ERR</code>) 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 <a class="external" href="http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite" title="http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite">W3C XHTML FAQ</a>.</div>
<h2 id="Spezifikation">Spezifikation</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Spezifikation</th>
<th scope="col">Status</th>
<th scope="col">Bemerkung</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName("HTML WHATWG", "#dom-document-writeln", "document.writeln()")}}</td>
<td>{{Spec2("HTML WHATWG")}}</td>
<td></td>
</tr>
<tr>
<td>{{SpecName("DOM2 HTML", "html.html#ID-35318390", "document.writeln()")}}</td>
<td>{{Spec2("DOM2 HTML")}}</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="Browser_Kompatibilität">Browser Kompatibilität</h2>
<p>{{Compat("api.Document.writeln")}}</p>
|