diff options
Diffstat (limited to 'files/fr/web/api/htmlformelement/length')
-rw-r--r-- | files/fr/web/api/htmlformelement/length/index.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/files/fr/web/api/htmlformelement/length/index.html b/files/fr/web/api/htmlformelement/length/index.html new file mode 100644 index 0000000000..9ca717ea44 --- /dev/null +++ b/files/fr/web/api/htmlformelement/length/index.html @@ -0,0 +1,29 @@ +--- +title: HTMLFormElement.length +slug: Web/API/HTMLFormElement/length +translation_of: Web/API/HTMLFormElement/length +--- +<div> +<div>{{APIRef("HTML DOM")}}</div> +</div> + +<p>La propriété en lecture seule <code><strong>HTMLFormElement.length</strong></code> retourne le nombre de contrôles présents dans l'élément {{HTMLElement("Form")}}.</p> + +<h2 id="Syntax" name="Syntax">Syntaxe</h2> + +<pre class="syntaxbox"><var>integer</var> = form.length +</pre> + +<h2 id="Example" name="Example">Exemple</h2> + +<pre class="brush:js">if (document.getElementById("form1").length > 1) { + // more than one form control here +} +</pre> + +<h2 id="Specifications" name="Specifications">Spécifications</h2> + +<ul> + <li><a href="http://www.w3.org/TR/html5/forms.html#dom-form-length" title="http://www.w3.org/TR/html5/forms.html#dom-form-length">HTML 5, Section 4.10.3, The form Element</a></li> + <li><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTML-HTMLFormElement-length">DOM Level 2: length</a></li> +</ul> |