aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/api/document/body/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pl/web/api/document/body/index.html')
-rw-r--r--files/pl/web/api/document/body/index.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/files/pl/web/api/document/body/index.html b/files/pl/web/api/document/body/index.html
new file mode 100644
index 0000000000..1ae1aa480e
--- /dev/null
+++ b/files/pl/web/api/document/body/index.html
@@ -0,0 +1,31 @@
+---
+title: document.body
+slug: Web/API/Document/body
+tags:
+ - DOM
+ - Dokumentacja_Gecko_DOM
+ - Gecko
+ - Wszystkie_kategorie
+translation_of: Web/API/Document/body
+---
+<p>{{ ApiRef() }}</p>
+<h3 id="Podsumowanie" name="Podsumowanie">Podsumowanie</h3>
+<p><b>body</b> zwraca węzeł <code>&lt;body&gt;</code> lub <code>&lt;frameset&gt;</code> z bieżącego dokumentu.</p>
+<h3 id="Sk.C5.82adnia" name="Sk.C5.82adnia">Składnia</h3>
+<pre class="eval"><i>objRef</i> = document.body
+document.body =<i>objRef</i>
+</pre>
+<h3 id="Przyk.C5.82ad" name="Przyk.C5.82ad">Przykład</h3>
+<pre class="eval">// HTML: &lt;body id="oldBodyElement"&gt;&lt;/body&gt;
+alert(document.body.id); // "oldBodyElement"
+var aNewBodyElement = document.createElement("body");
+aNewBodyElement.id = "newBodyElement";
+document.body = aNewBodyElement;
+alert(document.body.id); // "newBodyElement"
+</pre>
+<h3 id="Uwagi" name="Uwagi">Uwagi</h3>
+<p><code>document.body</code> to element zawierający treść dokumentu. W dokumentach z elementem <code>&lt;body&gt;</code> własność zwraca tenże element, w dokumentach z definicją ramek zwracany jest najbardziej zewnętrzny element <code>&lt;frameset&gt;</code>.</p>
+<p>Mimo, że <code>body</code> można samemu ustawić, jego zmiana spowoduje skuteczne usunięcie wszystkich potomków istniejącego elementu <code>&lt;body&gt;</code>.</p>
+<h3 id="Specyfikacja" name="Specyfikacja">Specyfikacja</h3>
+<p><a class="external" href="http://www.w3.org/TR/2000/WD-DOM-Level-2-HTML-20001113/html.html#ID-56360201">body </a></p>
+<p>{{ languages( { "en": "en/DOM/document.body", "es": "es/DOM/document.body" } ) }}</p>