blob: 9ca717ea447dcb9df6432e941cb6a6efb5a26ecd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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>
|