From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../api/htmlformelement/acceptcharset/index.html | 33 +++++ files/pl/web/api/htmlformelement/action/index.html | 36 ++++++ .../pl/web/api/htmlformelement/elements/index.html | 36 ++++++ .../pl/web/api/htmlformelement/encoding/index.html | 15 +++ .../pl/web/api/htmlformelement/enctype/index.html | 39 ++++++ files/pl/web/api/htmlformelement/index.html | 143 +++++++++++++++++++++ files/pl/web/api/htmlformelement/length/index.html | 33 +++++ files/pl/web/api/htmlformelement/method/index.html | 35 +++++ files/pl/web/api/htmlformelement/name/index.html | 44 +++++++ files/pl/web/api/htmlformelement/reset/index.html | 37 ++++++ files/pl/web/api/htmlformelement/submit/index.html | 37 ++++++ files/pl/web/api/htmlformelement/target/index.html | 35 +++++ 12 files changed, 523 insertions(+) create mode 100644 files/pl/web/api/htmlformelement/acceptcharset/index.html create mode 100644 files/pl/web/api/htmlformelement/action/index.html create mode 100644 files/pl/web/api/htmlformelement/elements/index.html create mode 100644 files/pl/web/api/htmlformelement/encoding/index.html create mode 100644 files/pl/web/api/htmlformelement/enctype/index.html create mode 100644 files/pl/web/api/htmlformelement/index.html create mode 100644 files/pl/web/api/htmlformelement/length/index.html create mode 100644 files/pl/web/api/htmlformelement/method/index.html create mode 100644 files/pl/web/api/htmlformelement/name/index.html create mode 100644 files/pl/web/api/htmlformelement/reset/index.html create mode 100644 files/pl/web/api/htmlformelement/submit/index.html create mode 100644 files/pl/web/api/htmlformelement/target/index.html (limited to 'files/pl/web/api/htmlformelement') diff --git a/files/pl/web/api/htmlformelement/acceptcharset/index.html b/files/pl/web/api/htmlformelement/acceptcharset/index.html new file mode 100644 index 0000000000..c71b52269f --- /dev/null +++ b/files/pl/web/api/htmlformelement/acceptcharset/index.html @@ -0,0 +1,33 @@ +--- +title: HTMLFormElement.acceptCharset +slug: Web/API/HTMLFormElement/acceptCharset +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/acceptCharset +--- +

 

+ +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

acceptCharset Zwraca listę obsługiwanych przez formularz zestawów znaków dla danego elementu FORM. Lista ta będzie oddzielona przecinkiem lub spacją.

+ +

Składnia

+ +
string = form.acceptCharset;
+
+ +

Przykład

+ +
inputs = document.forms["myform"].acceptCharset
+
+ +

Specyfikacja

+ +

DOM Level 2 HTML: acceptCharset

+ +

{{ languages( { "en": "en/DOM/form.acceptCharset" } ) }}

diff --git a/files/pl/web/api/htmlformelement/action/index.html b/files/pl/web/api/htmlformelement/action/index.html new file mode 100644 index 0000000000..ba03220cd0 --- /dev/null +++ b/files/pl/web/api/htmlformelement/action/index.html @@ -0,0 +1,36 @@ +--- +title: HTMLFormElement.action +slug: Web/API/HTMLFormElement/action +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/action +--- +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

action pobiera/ustawia akcję dla elementu FORM.

+ +

Składnia

+ +
string = form.action
+form.action =
+string
+
+ +

Przykład

+ +

form.action = "/cgi-bin/publish";

+ +

Uwagi

+ +

Akcja w formularzu jest programem, który jest wykonywany na serwerze kiedy formularz zostanie wysłany. Ta własność może być odzyskiwana lub ustawiana.

+ +

Specyfikacja

+ +

DOM Level 2 HTML: action

+ +

{{ languages( { "ja": "ja/DOM/form.action", "en": "en/DOM/form.action" } ) }}

diff --git a/files/pl/web/api/htmlformelement/elements/index.html b/files/pl/web/api/htmlformelement/elements/index.html new file mode 100644 index 0000000000..929f7c7640 --- /dev/null +++ b/files/pl/web/api/htmlformelement/elements/index.html @@ -0,0 +1,36 @@ +--- +title: HTMLFormElement.elements +slug: Web/API/HTMLFormElement/elements +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/elements +--- +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

elements zwraca kolekcję HTMLCollection wszystkich kontrolek zawartych w elemencie FORM.

+ +

Do konkretnego elementu możesz odnosić się poprzez indeks lub za pomocą nazwy (name) bądź id tego elementu.

+ +

Składnia

+ +
listaWęzłów =
+HTMLFormElement.elements
+
+ +

Przykłady

+ +
var inputs = document.getElementById("form1").elements;
+var inputByIndex = inputs[2];
+var inputByName = inputs["login"];
+
+ +

Specyfikacja

+ +

Specyfikacja W3C DOM 2 HTML: elements

+ +

{{ languages( { "en": "en/DOM/form.elements", "ja": "ja/DOM/form.elements" } ) }}

diff --git a/files/pl/web/api/htmlformelement/encoding/index.html b/files/pl/web/api/htmlformelement/encoding/index.html new file mode 100644 index 0000000000..aabd43e66f --- /dev/null +++ b/files/pl/web/api/htmlformelement/encoding/index.html @@ -0,0 +1,15 @@ +--- +title: HTMLFormElement.encoding +slug: Web/API/HTMLFormElement/encoding +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/encoding +--- +

 

+ +

{{ ApiRef() }} encoding jest alternatywną nazwą dla elementu enctype w obiekcie DOM FormElement.

+ +

{{ languages( { "en": "en/DOM/form.encoding" } ) }}

diff --git a/files/pl/web/api/htmlformelement/enctype/index.html b/files/pl/web/api/htmlformelement/enctype/index.html new file mode 100644 index 0000000000..2a90fe13a9 --- /dev/null +++ b/files/pl/web/api/htmlformelement/enctype/index.html @@ -0,0 +1,39 @@ +--- +title: HTMLFormElement.enctype +slug: Web/API/HTMLFormElement/enctype +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/enctype +--- +

 

+ +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

enctype pobiera/ustawia typ zawartości elementu FORM.

+ +

Składnia

+ +
string = form.enctype
+form.enctype =
+string
+
+ +

Przykład

+ +
form.enctype = "application/x-www-form-urlencoded";
+
+ +

Uwagi

+ +

Typem kodowania jest ogólnie "application/x-www-form-urlencoded".

+ +

Specyfikacja

+ +

DOM Level 2 HTML: enctype

+ +

{{ languages( { "en": "en/DOM/form.enctype" } ) }}

diff --git a/files/pl/web/api/htmlformelement/index.html b/files/pl/web/api/htmlformelement/index.html new file mode 100644 index 0000000000..3c0d1ade95 --- /dev/null +++ b/files/pl/web/api/htmlformelement/index.html @@ -0,0 +1,143 @@ +--- +title: HTMLFormElement +slug: Web/API/HTMLFormElement +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement +--- +

{{ ApiRef() }}

+ +

Interfejs elementu HTML FORM

+ +

Elementy FORM mają wszystkie właściwości i metody innych elementów HTML, tak jak opisano w rozdziale o elementach. Jednocześnie mają one bardziej wyspecjalizowany interfejs HTMLFormElement.

+ +

Interfejs ten dostarcza metod do tworzenia i modyfikacji elementów FORM przy użyciu DOM. Poniższy przykład przedstawia, jak utworzyć nowy formularz, zmienić jego atrybuty i wysłać go.

+ +
// Utwórz formularz
+var f = document.createElement("form");
+
+// Dodaj do zawartości dokumentu
+document.body.appendChild(f);
+
+// Ustaw atrybuty oznaczające akcję i metodę wysyłania
+f.action = "/cgi-bin/some.cgi";
+f.method = "POST"
+
+// Wyślij formularz
+f.submit();
+
+ +

Z kolei poniższy dokument HTML przedstawia jak wydobyć informacje z formularza i nadać mu pewne atrybuty.

+ +
<title>Przykład formularza</title>
+<script type="text/javascript">
+  function getFormInfo() {
+    var info;
+
+    // Znajdź referencję do formularza poprzez kolekcję forms
+    var f = document.forms["formA"];
+    info = "f.elements: " + f.elements + "\n"
+         + "f.length: " + f.length + "\n"
+         + "f.name: " + f.elements + "\n"
+         + "f.acceptCharset: " + f.acceptCharset + "\n"
+         + "f.action: " + f.action + "\n"
+         + "f.enctype: " + f.enctype + "\n"
+         + "f.encoding: " + f.encoding + "\n"
+         + "f.method: " + f.method + "\n"
+         + "f.target: " + f.target;
+    document.forms["formA"].elements['tex'].value = info;
+  }
+
+  // Referencja do formularza jest przekazywana z atrybutu
+  // onclick przycisku za pomocą 'this.form'
+  function setFormInfo(f) {
+    f.method = "GET";
+    f.action = "/cgi-bin/evil_executable.cgi";
+    f.name   = "totally_new";
+  }
+</script>
+
+<h1>Przykład formularza</h1>
+
+<form name="formA" id="formA"
+ action="/cgi-bin/test" method="POST">
+ <p>Kliknij "info" by zobaczyć informację o formularzu,
+ "zmień" by zmienić ustawienia, a następnie ponownie "info"
+ by zobaczyć efekt zmian.</p>
+ <p>
+  <input type="button" value="info"
+   onclick="getFormInfo();">
+  <input type="button" value="zmień"
+   onclick="setFormInfo(this.form);">
+  <input type="reset" value="zresetuj">
+  <br>
+  <textarea id="tex" style="height:15em; width:20em">
+ </p>
+</form>
+
+ +

Własności

+ +
+
form.elements
+
Zwraca kolekcję wszystkich kontrolek zawartych w elemencie FORM.
+
+ +
+
form.length
+
Zwraca ilość kontrolek w elemencie FORM.
+
+ +
+
form.name
+
Zwraca ciąg z nazwą bieżącego elementu FORM.
+
+ +
+
form.acceptCharset
+
Zwraca listę obsługiwanych przez formularz zestawów znaków.
+
+ +
+
form.action
+
Pobiera/ustawia akcję dla elementu FORM.
+
+ +
+
form.enctype
+
Pobiera/ustawia typ zawartości wysyłanej przez formularz.
+
+ +
+
form.encoding
+
Pobiera/ustawia typ zawartości wysyłanej przez formularz.
+
+ +
+
form.method
+
Pobiera/ustawia metodę HTTP używaną do wysłania formularza.
+
+ +
+
form.target
+
Pobiera/ustawia okno docelowe akcji formularza (np. ramka, w której zostanie wyrenderowana zwrócona strona).
+
+ +

Metody

+ +
+
form.submit
+
Wysyła formularz
+
+ +
+
form.reset
+
Przywraca formularz do jego stanu początkowego
+
+ +
 
+ +

{{ languages( { "en": "en/DOM/form", "es": "es/DOM/form", "fr": "fr/DOM/form", "ja": "ja/DOM/form" } ) }}

diff --git a/files/pl/web/api/htmlformelement/length/index.html b/files/pl/web/api/htmlformelement/length/index.html new file mode 100644 index 0000000000..36c5c63349 --- /dev/null +++ b/files/pl/web/api/htmlformelement/length/index.html @@ -0,0 +1,33 @@ +--- +title: HTMLFormElement.length +slug: Web/API/HTMLFormElement/length +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/length +--- +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

length zwraca liczbę kontrolek w elemencie FORM.

+ +

Składnia

+ +
integer = form.length
+
+ +

Przykład

+ +
if (document.getElementById("form1").length > 1) {
+  // więcej niż jedena kontrolka formularza jest tu
+}
+
+ +

Specyfikacja

+ +

DOM Level 2: length

+ +

{{ languages( { "ja": "ja/DOM/form.length", "en": "en/DOM/form.length" } ) }}

diff --git a/files/pl/web/api/htmlformelement/method/index.html b/files/pl/web/api/htmlformelement/method/index.html new file mode 100644 index 0000000000..d1829b02c6 --- /dev/null +++ b/files/pl/web/api/htmlformelement/method/index.html @@ -0,0 +1,35 @@ +--- +title: HTMLFormElement.method +slug: Web/API/HTMLFormElement/method +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/method +--- +

 

+ +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

method pobiera/ustawia metodę HTTP używaną do wysłania formularza.

+ +

Składnia

+ +
string = form.method
+form.method =
+string
+
+ +

Przykład

+ +
document.forms["myform"].method = "post";
+
+ +

Specyfikacja

+ +

DOM Level 2 HTML: method

+ +

{{ languages( { "ja": "ja/DOM/form.method", "en": "en/DOM/form.method" } ) }}

diff --git a/files/pl/web/api/htmlformelement/name/index.html b/files/pl/web/api/htmlformelement/name/index.html new file mode 100644 index 0000000000..673ab8f847 --- /dev/null +++ b/files/pl/web/api/htmlformelement/name/index.html @@ -0,0 +1,44 @@ +--- +title: HTMLFormElement.name +slug: Web/API/HTMLFormElement/name +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/name +--- +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

name zwraca nazwą bieżącego elementu FORM jako łańcuch znaków.

+ +

Składnia

+ +
string = form.name
+form.name =
+string
+
+ +

Przykład

+ +
form1 = document.getElementById("form1").name;
+if (form1 != document.form.form1) {
+   // przeglądarka nie obsługuje tego odniesienia do formularza
+}
+
+ +

Uwagi

+ +

Uwaga, ta własność jest do odczytu/zapisu, która znaczy, że możemy zmienić lub ustawić nazwę formularza.

+ +

Jeśli Twój FORM zawiera element nazwany "nazwany_element", następnie ten element przesłania własność form.name, więc nie możesz uzyskać do niego dostępu.

+ +

Internet Explorer (IE) nie pozwala nazwie tworzonego elementu używać createElement() będącej ustawieniem lub modyfikacją używającą własność name property.

+ +

Specyfikacja

+ +

DOM Level 2 HTML: name

+ +

{{ languages( { "en": "en/DOM/form.name" } ) }}

diff --git a/files/pl/web/api/htmlformelement/reset/index.html b/files/pl/web/api/htmlformelement/reset/index.html new file mode 100644 index 0000000000..919b982cae --- /dev/null +++ b/files/pl/web/api/htmlformelement/reset/index.html @@ -0,0 +1,37 @@ +--- +title: HTMLFormElement.reset +slug: Web/API/HTMLFormElement/reset +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/reset +--- +

{{ APIRef }}

+ +

Podsumowanie

+ +

reset przywraca formularz do jego stanu początkowego.

+ +

Składnia

+ +
HTMLFormElement.reset()
+
+ +

Przykład

+ +
document.forms["myform"].reset();
+
+ +

Uwagi

+ +

Metoda ta robi to samo, co kliknięcie przycisku Wyczyść w formularzu.

+ +

Jeśli kontrolka formularza (jak np. przycisk Wyczyść) posiada nazwę lub id to przycisk Wyczyść będzie krył czyszczenie formularza.

+ +

Specyfikacja

+ +

DOM Level 2 HTML: reset

+ +

{{ languages( { "en": "en/DOM/form.reset" } ) }}

diff --git a/files/pl/web/api/htmlformelement/submit/index.html b/files/pl/web/api/htmlformelement/submit/index.html new file mode 100644 index 0000000000..078d02d4f5 --- /dev/null +++ b/files/pl/web/api/htmlformelement/submit/index.html @@ -0,0 +1,37 @@ +--- +title: HTMLFormElement.submit +slug: Web/API/HTMLFormElement/submit +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/submit +--- +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

submit wysyła formularz.

+ +

Składnia

+ +
HTMLFormElement.submit()
+
+ +

Przykład

+ +
document.forms["myform"].submit()
+
+ +

Uwagi

+ +

Ta metoda działa tak samo jak naciśnięcie przycisku 'Wyślij' w formularzu.

+ +

Jeśli kontrolka formularza (taka jak przycisk Wyślij) posiada nazwę lub id zmiennej submit to będzie ona maskowała metodę submit formularza.

+ +

Specyfikacja

+ +

DOM Level 2 HTML: submit

+ +

{{ languages( { "ja": "ja/DOM/form.submit", "en": "en/DOM/form.submit" } ) }}

diff --git a/files/pl/web/api/htmlformelement/target/index.html b/files/pl/web/api/htmlformelement/target/index.html new file mode 100644 index 0000000000..f52fbe974b --- /dev/null +++ b/files/pl/web/api/htmlformelement/target/index.html @@ -0,0 +1,35 @@ +--- +title: HTMLFormElement.target +slug: Web/API/HTMLFormElement/target +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/HTMLFormElement/target +--- +

 

+ +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

target pobiera/ustawia element docelowy działania (np., w której ramce ma być wczytana zawartość strony).

+ +

Składnia

+ +
string = form.target
+form.target =
+string
+
+ +

Przykład

+ +
myForm.target = document.frames[1].name;
+
+ +

Specyfikacja

+ +

DOM Level 2 HTML: target

+ +

{{ languages( { "en": "en/DOM/form.target" } ) }}

-- cgit v1.2.3-54-g00ecf