HTMLFormElement.length
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
La propriété en lecture seule HTMLFormElement.length
retourne le nombre de contrôles présents dans l'élément <form>
.
Syntaxe
js
integer = form.length;
Exemple
js
if (document.getElementById("form1").length > 1) {
// more than one form control here
}