aboutsummaryrefslogtreecommitdiff
path: root/files/he/web/api/document/write/index.html
blob: 8c497d548cf8a24c45fedb5ff0b83c4a5652acc3 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
title: 'Document.write():'
slug: Web/API/Document/write
translation_of: Web/API/Document/write
---
<div>{{ ApiRef("DOM") }}</div>

<p><strong><code>()Document.write</code></strong> - כותב מחרוזת טקסט אל גוף מסמך HTML.</p>

<h2 id="תחביר">תחביר</h2>

<pre class="brush: js">document.write(<em>markup</em>);
</pre>

<h3 id="פרמטרים">פרמטרים</h3>

<dl>
 <dt><code>markup</code></dt>
 <dd>מחרוזת המכילה את הטקסט שיופיע במסמך.</dd>
</dl>

<h3 id="דוגמה">דוגמה</h3>

<pre class="brush: html">&lt;html&gt;

&lt;head&gt;
  &lt;title&gt;write example&lt;/title&gt;

  &lt;script&gt;
    function newContent() {
      alert("load new content");
      document.open();
      document.write("&lt;h1&gt;Out with the old - in with the new!&lt;/h1&gt;");
      document.close();
    }
  &lt;/script&gt;
&lt;/head&gt;

&lt;body onload="newContent();"&gt;
  &lt;p&gt;Some original document content.&lt;/p&gt;
&lt;/body&gt;

&lt;/html&gt;

</pre>

<h2 id="מפרט">מפרט</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("HTML WHATWG", "#dom-document-write", "document.write(...)")}}</td>
   <td>{{Spec2("HTML WHATWG")}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName("DOM2 HTML", "html.html#ID-75233634", "document.write(...)")}}</td>
   <td>{{Spec2("DOM2 HTML")}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="תאימות_דפדפן">תאימות דפדפן</h2>



<p>{{Compat("api.Document.write")}}</p>

<h2 id="ראה_גם">ראה גם</h2>

<ul>
 <li>{{ domxref("element.innerHTML") }}</li>
 <li>{{ domxref("document.createElement()") }}</li>
</ul>