diff options
Diffstat (limited to 'files/it/web/api/htmlformelement')
| -rw-r--r-- | files/it/web/api/htmlformelement/acceptcharset/index.html | 22 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/action/index.html | 30 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/elements/index.html | 34 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/enctype/index.html | 28 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/index.html | 125 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/length/index.html | 26 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/method/index.html | 28 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/name/index.html | 35 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/reset/index.html | 28 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/submit/index.html | 30 | ||||
| -rw-r--r-- | files/it/web/api/htmlformelement/target/index.html | 24 |
11 files changed, 410 insertions, 0 deletions
diff --git a/files/it/web/api/htmlformelement/acceptcharset/index.html b/files/it/web/api/htmlformelement/acceptcharset/index.html new file mode 100644 index 0000000000..5100a8d7f4 --- /dev/null +++ b/files/it/web/api/htmlformelement/acceptcharset/index.html @@ -0,0 +1,22 @@ +--- +title: HTMLFormElement.acceptCharset +slug: Web/API/HTMLFormElement/acceptCharset +translation_of: Web/API/HTMLFormElement/acceptCharset +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><b>acceptCharset</b> restituisce una lista delle <a href="it/Codifiche_dei_caratteri">codifiche dei caratteri</a> supportate per un dato elemento <code>form</code>. Questa lista è una stringa e gli elementi possono essere separati da virgole o da spazi.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>stringa</i> = form.acceptCharset; +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">inputs = document.forms["myform"].acceptCharset +</pre> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-19661795">DOM Level 2 HTML: acceptCharset</a></p> diff --git a/files/it/web/api/htmlformelement/action/index.html b/files/it/web/api/htmlformelement/action/index.html new file mode 100644 index 0000000000..8b55910259 --- /dev/null +++ b/files/it/web/api/htmlformelement/action/index.html @@ -0,0 +1,30 @@ +--- +title: HTMLFormElement.action +slug: Web/API/HTMLFormElement/action +translation_of: Web/API/HTMLFormElement/action +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><b>action</b> legge o imposta l'attributo <code>action</code> dell'elemento <code>FORM</code>.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>stringa</i> = form.action +form.action = +<i>stringa</i> +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">form.action = "/cgi-bin/publish"; +</pre> + +<h3 id="Note" name="Note">Note</h3> + +<p>L'attributo <code>action</code> di un form è il programma che viene eseguito sul server quando il form viene inviato. Questa proprietà può essere letta o impostata.</p> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-74049184">DOM Level 2 HTML: action</a></p> + +<p>{{ languages( { "ja": "ja/DOM/form.action" } ) }}</p> diff --git a/files/it/web/api/htmlformelement/elements/index.html b/files/it/web/api/htmlformelement/elements/index.html new file mode 100644 index 0000000000..3ea2a2aa32 --- /dev/null +++ b/files/it/web/api/htmlformelement/elements/index.html @@ -0,0 +1,34 @@ +--- +title: HTMLFormElement.elements +slug: Web/API/HTMLFormElement/elements +tags: + - DOM + - Gecko + - Reference_del_DOM_di_Gecko + - Tutte_le_categorie +translation_of: Web/API/HTMLFormElement/elements +--- +<div> +<div>{{APIRef("HTML DOM")}}</div> +</div> + +<p>Restituisce una <code><a class="external" href="http://www.w3.org/TR/2001/WD-DOM-Level-2-HTML-20011025/html.html#ID-75708506">HTMLCollection</a></code> contenente tutti i controlli dell'elemento form a cui si riferisce.</p> + +<p>Puoi accedere un elemento della collezione sia usando l'indice che usando l'<a href="it/DOM/element.id">id</a> o il <a href="it/DOM/element.name">name</a>.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>nodeList</i> = +<i>HTMLFormElement</i>.elements +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">var input = document.getElementById("form1").elements; +var inputByIndex = inputs[2]; //indice +var inputByName = inputs["login"]; //id oppure name +</pre> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p>Specifica W3C DOM 2 HTML Specifica <a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-76728479">elements</a></p> diff --git a/files/it/web/api/htmlformelement/enctype/index.html b/files/it/web/api/htmlformelement/enctype/index.html new file mode 100644 index 0000000000..082db19303 --- /dev/null +++ b/files/it/web/api/htmlformelement/enctype/index.html @@ -0,0 +1,28 @@ +--- +title: HTMLFormElement.enctype +slug: Web/API/HTMLFormElement/enctype +translation_of: Web/API/HTMLFormElement/enctype +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><b>enctype</b> legge o imposta il tipo di contenuto del form.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>stringa</i> = form.enctype +form.enctype = +<i>stringa</i> +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">form.enctype = "application/x-www-form-urlencoded"; +</pre> + +<h3 id="Note" name="Note">Note</h3> + +<p>Il tipo di codifica predefinito è "application/x-www-form-urlencoded".</p> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-84227810">DOM Level 2 HTML: enctype</a></p> diff --git a/files/it/web/api/htmlformelement/index.html b/files/it/web/api/htmlformelement/index.html new file mode 100644 index 0000000000..35ef7bcb58 --- /dev/null +++ b/files/it/web/api/htmlformelement/index.html @@ -0,0 +1,125 @@ +--- +title: form +slug: Web/API/HTMLFormElement +tags: + - DOM + - Gecko + - Reference_del_DOM_di_Gecko + - Tutte_le_categorie +translation_of: Web/API/HTMLFormElement +--- +<p>{{ ApiRef() }}</p> +<h3 id="HTML_Form_Element_Interface" name="HTML_Form_Element_Interface">HTML Form Element Interface</h3> +<p>L'elemento <code>FORM</code> possiede tutte le proprietà e i metodi di qualunque <a href="it/DOM/element">element</a>, e inoltre ha un'interfaccia specializzata: <a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-40002357">HTMLFormElement</a>.</p> +<p>Questa interfaccia fornisce i metodi per creare e modificare gli elementi del <code>FORM</code>. L'esempio seguente mostra come creare un nuovo elemento form, modificare i suoi attributi e inviarlo.</p> +<pre>// Crea un form +var f = document.createElement("form"); + +// Lo aggiungere come ultimo nodo all'interno dell'elemento Body +document.body.appendChild(f); + +// Setta l'attributo action e l'attributo method +f.action = "/cgi-bin/some.cgi"; +f.method = "POST" + +// Invia il form tramite il metodo submit +f.submit(); +</pre> +<p>Il seguente esempio di pagina HTML mostra come estrarre informazioni da un form e come settare alcuni dei suoi attributi.</p> +<pre></html> +<head> +<title>Esempio di Form</title> +<script type="text/javascript"> + function getFormInfo() { + var info; + + // Ricava un riferimento al form usando la collezione di form disponibile in document + 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; + } + + // Un riferimento al form viene passato + // dall'attributo onclick del button usando 'this.form' + function setFormInfo(f) { + f.method = "GET"; + f.action = "/cgi-bin/evil_executable.cgi"; + f.name = "totally_new"; + } +</script> +</head> +<body> +<h1>Form example</h1> + +<form id="formA" + action="/cgi-bin/test" method="POST"> + <p>Clicca "Info" per vedere delle info sul form. + Cllica set per cambiare i settaggi,quindi di nuovo info per vedere l'effetto</p> + <p> + <input type="button" value="info" + onclick="getFormInfo();"> + <input type="button" value="set" + onclick="setFormInfo(this.form);"> + <input type="reset" value="reset"> + <br> + <textarea id="tex" style="height:15em; width:20em"> + </p> +</form> +</body> +</html> +</pre> +<h3 id="Propriet.C3.A0" name="Propriet.C3.A0">Proprietà</h3> +<dl> + <dt> + <a href="it/DOM/form.elements">form.elements</a></dt> + <dd> + Restituisce una collezione dei controlli contenuti form corrente.</dd> + <dt> + <a href="it/DOM/form.length">form.length</a></dt> + <dd> + Restituisce il numero di controlli contenuti nel form corrente.</dd> + <dt> + <a href="it/DOM/form.name">form.name</a></dt> + <dd> + Restituisce una stringa con con il valore dell'attributo name del form corrente.</dd> + <dt> + <a href="it/DOM/form.acceptCharset">form.acceptCharset</a></dt> + <dd> + Restituisce una lista dei set di caratteri supportati per il form corrente.</dd> + <dt> + <a href="it/DOM/form.action">form.action</a></dt> + <dd> + Restituisce/setta l'URI a cui verranno spediti i dati del form.</dd> + <dt> + <a href="it/DOM/form.enctype">form.enctype</a></dt> + <dd> + Restituisce/setta il tipo di contenuto che il form corrente invierà al server.</dd> + <dt> + <a href="it/DOM/form.method">form.method</a></dt> + <dd> + Restituisce/setta il metodo con cui inviare le informazioni al server.</dd> + <dt> + <a href="it/DOM/form.target">form.target</a></dt> + <dd> + Restituisce/setta il nome del frame in cui rendere la pagina di risposta del server.</dd> +</dl> +<h3 id="Metodi" name="Metodi">Metodi</h3> +<dl> + <dt> + <a href="it/DOM/form.submit">form.submit</a></dt> + <dd> + Invia il form.</dd> + <dt> + <a href="it/DOM/form.reset">form.reset</a></dt> + <dd> + Riporta il form al suo stato iniziale.</dd> +</dl> +<p>{{ languages( { "fr": "fr/DOM/form", "pl": "pl/DOM/form", "en": "en/DOM/form" } ) }}</p> diff --git a/files/it/web/api/htmlformelement/length/index.html b/files/it/web/api/htmlformelement/length/index.html new file mode 100644 index 0000000000..34f1e82ef3 --- /dev/null +++ b/files/it/web/api/htmlformelement/length/index.html @@ -0,0 +1,26 @@ +--- +title: HTMLFormElement.length +slug: Web/API/HTMLFormElement/length +translation_of: Web/API/HTMLFormElement/length +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><b>length</b> restituisce il numero di controlli contenuti dall'elemento <code>FORM</code>.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>integer</i> = form.length +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">if (document.getElementById("form1").length > 1) { + // vi è più di un controllo +} +</pre> + +<h4 id="Specification" name="Specification">Specification</h4> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTML-HTMLFormElement-length">DOM Level 2: length</a></p> + +<p>{{ languages( { "ja": "ja/DOM/form.length" } ) }}</p> diff --git a/files/it/web/api/htmlformelement/method/index.html b/files/it/web/api/htmlformelement/method/index.html new file mode 100644 index 0000000000..bffd4f7faf --- /dev/null +++ b/files/it/web/api/htmlformelement/method/index.html @@ -0,0 +1,28 @@ +--- +title: HTMLFormElement.method +slug: Web/API/HTMLFormElement/method +translation_of: Web/API/HTMLFormElement/method +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><b>method</b> legge o imposta il metodo HTTP utilizzato per l'invio del form.</p> + +<p> + </p><h3 id="Sintassi" name="Sintassi">Sintassi</h3> +<p></p> + +<pre class="eval"><i>stringa</i> = form.method +form.method = +<i>stringa</i> +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">document.forms["myform"].method = "POST"; +</pre> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-82545539">DOM Level 2 HTML: method</a></p> + +<p>{{ languages( { "ja": "ja/DOM/form.method" } ) }}</p> diff --git a/files/it/web/api/htmlformelement/name/index.html b/files/it/web/api/htmlformelement/name/index.html new file mode 100644 index 0000000000..1e6c741329 --- /dev/null +++ b/files/it/web/api/htmlformelement/name/index.html @@ -0,0 +1,35 @@ +--- +title: HTMLFormElement.name +slug: Web/API/HTMLFormElement/name +translation_of: Web/API/HTMLFormElement/name +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><code>name</code> restituisce il nome dell'elemento <code>FORM</code> corrente come stringa.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>stringa</i> = form.name +form.name = +<i>stringa</i> +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">form1 = document.getElementById("form1").name; +if (form1 != document.form.form1) { + // il browser non supporta questo tipo di riferimenti +} +</pre> + +<h3 id="Note" name="Note">Note</h3> + +<p>Si noti che questa proprietà può essere letta o impostata, il chè significa che è possibile modificare o impostare il nome del form.</p> + +<p>Se l'elemento <code>FORM</code> contiene un elemento chiamato "name", questo elemento coprirà la proprietà <code>form.name</code>, quindi non sarà possibile utilizzarla.</p> + +<p>Internet Explorer (IE) non permette di modificare l'attributo <code>name</code> di un elemento che è stato creato con <code>createElement()</code> utilizzando la proprietà <code>name</code>.</p> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-22051454">DOM Level 2 HTML: name</a></p> diff --git a/files/it/web/api/htmlformelement/reset/index.html b/files/it/web/api/htmlformelement/reset/index.html new file mode 100644 index 0000000000..0d373e6938 --- /dev/null +++ b/files/it/web/api/htmlformelement/reset/index.html @@ -0,0 +1,28 @@ +--- +title: HTMLFormElement.reset +slug: Web/API/HTMLFormElement/reset +translation_of: Web/API/HTMLFormElement/reset +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><code>reset</code> resetta il form al suo stato iniziale.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>HTMLForm</i>.reset() +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">document.forms["mioForm"].reset(); +</pre> + +<h3 id="Note" name="Note">Note</h3> + +<p>Questo metodo simula ciò che accadrebbe se l'utente cliccasse il bottone reset.</p> + +<p>Se un controllo di un form (come il bottone reset) ha come nome <var>reset</var>, questo coprirà il metodo reset.</p> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-76767677">DOM Level 2 HTML: reset</a></p> diff --git a/files/it/web/api/htmlformelement/submit/index.html b/files/it/web/api/htmlformelement/submit/index.html new file mode 100644 index 0000000000..b762349b6c --- /dev/null +++ b/files/it/web/api/htmlformelement/submit/index.html @@ -0,0 +1,30 @@ +--- +title: HTMLFormElement.submit() +slug: Web/API/HTMLFormElement/submit +translation_of: Web/API/HTMLFormElement/submit +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><code>submit</code> invia il form.</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>HTMLForm</i>.submit() +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">document.forms["mioForm"].submit() +</pre> + +<h3 id="Note" name="Note">Note</h3> + +<p>Questo metodo simula ciò che accadrebbe se l'utente cliccasse sul bottone "invia".</p> + +<p>Se il controllo di un form (come il bottone di invio) ha come nome o un id <var>submit</var>, questo coprirà il metodo submit.</p> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-76767676">DOM Level 2 HTML: submit</a></p> + +<p>{{ languages( { "ja": "ja/DOM/form.submit" } ) }}</p> diff --git a/files/it/web/api/htmlformelement/target/index.html b/files/it/web/api/htmlformelement/target/index.html new file mode 100644 index 0000000000..c94b8a78f9 --- /dev/null +++ b/files/it/web/api/htmlformelement/target/index.html @@ -0,0 +1,24 @@ +--- +title: HTMLFormElement.target +slug: Web/API/HTMLFormElement/target +translation_of: Web/API/HTMLFormElement/target +--- +<div>{{APIRef("HTML DOM")}}</div> + +<p><b>target</b> legge o imposta il contenuto dell'attributo target (per esempio, il frame dove verrà visualizzato l'output del form).</p> + +<h3 id="Sintassi" name="Sintassi">Sintassi</h3> + +<pre class="eval"><i>stringa</i> = form.target +form.target = +<i>stringa</i> +</pre> + +<h3 id="Esempio" name="Esempio">Esempio</h3> + +<pre class="eval">myForm.target = document.frames[1].name; +</pre> + +<h3 id="Specifiche" name="Specifiche">Specifiche</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-6512890">DOM Level 2 HTML: target</a></p> |
