From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pl/web/api/document/write/index.html | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 files/pl/web/api/document/write/index.html (limited to 'files/pl/web/api/document/write') diff --git a/files/pl/web/api/document/write/index.html b/files/pl/web/api/document/write/index.html new file mode 100644 index 0000000000..24daccf070 --- /dev/null +++ b/files/pl/web/api/document/write/index.html @@ -0,0 +1,38 @@ +--- +title: document.write +slug: Web/API/Document/write +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/Document/write +--- +

{{ ApiRef() }}

+

Podsumowanie

+

Zapisuje ciąg tekstu w strumieniu dokumentu otwartym przez document.open.

+

Składnia

+
document.write(tekst)
+
+

Parametry

+ +

Przykład

+
document.open();
+document.write("<h1>witam!</h1>");
+document.close();
+
+

Uwagi

+

Zapis do dokumentu, który już się załadował, bez wywoływania document.open spowoduje automatyczne przeprowadzenie document.open. Zaleca się wywołanie document.close po skończeniu zapisu, aby poinformować przeglądarkę, by zakończyła ładowanie strony. Tekst, który zapisujesz, jest parsowany i trafia do modelu struktury dokumentu. W poniższym przykładzie element H1 staje się węzłem. Jeżeli wywołanie document.write() zostało zagnieżdżone bezpośrednio w kodzie HTML, nie spowoduje ono uruchomienia document.open. Np.:

+
 <div>
+  <script type="text/javascript">
+    document.write("<h1>Main title</h1>")
+  </script>
+ </div>
+
+

Specyfikacja

+

write

+
+  
+

{{ languages( { "en": "en/DOM/document.write", "fr": "fr/DOM/document.write", "ja": "ja/DOM/document.write" } ) }}

-- cgit v1.2.3-54-g00ecf