diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
| commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
| tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/api/htmlformelement/name | |
| parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
| download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip | |
initial commit
Diffstat (limited to 'files/fr/web/api/htmlformelement/name')
| -rw-r--r-- | files/fr/web/api/htmlformelement/name/index.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/files/fr/web/api/htmlformelement/name/index.html b/files/fr/web/api/htmlformelement/name/index.html new file mode 100644 index 0000000000..6a144b2e79 --- /dev/null +++ b/files/fr/web/api/htmlformelement/name/index.html @@ -0,0 +1,32 @@ +--- +title: HTMLFormElement.name +slug: Web/API/HTMLFormElement/name +translation_of: Web/API/HTMLFormElement/name +--- +<div> +<div>{{APIRef("HTML DOM")}}</div> +</div> + +<p>La propriété <code>HTMLFormElement.name</code> représente le nom de l'élément <code>form</code> sous la forme d'une chaîne de caratères.</p> + +<p>Si votre {{HTMLElement("Form")}} contient un élément appelé <em>name</em>, alors ce dernier redéfinit la propriété <code>form.name</code>, afin que vous ne puissiez y accéder. Internet Explorer (IE) bloque la définition ou la modification du nom d'un élément créé avec <code>createElement()</code> à partir de la propriété <code>name</code>.</p> + +<h2 id="Syntax" name="Syntax">Syntaxe</h2> + +<pre class="syntaxbox"><em>string</em> = form.name +form.name = <em>string</em></pre> + +<h2 id="Example" name="Example">Exemple</h2> + +<pre class="brush:js">var form1name = document.getElementById("form1").name; + +if (form1name != document.form.form1) { + // browser doesn't support this form of reference +}</pre> + +<h2 id="Specification" name="Specification">Spécification</h2> + +<ul> + <li><a class="external" href="http://www.w3.org/TR/html5/forms.html#dom-form-name" title="http://www.w3.org/TR/html5/forms.html#dom-form-name">HTML 5, Section 4.10.3, The form Element</a></li> + <li><a class="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-22051454">DOM Level 2 HTML: name</a></li> +</ul> |
