HTMLFormElement.length

The HTMLFormElement.length read-only property returns the number of controls in the <form> element.

Syntax

integer = form.length

Example

if (document.getElementById("form1").length > 1) {
  // more than one form control here
}

Specifications

Document Tags and Contributors

 Contributors to this page: teoli, kscarfone, ethertank, Sheppy, jswisher, Mgjbot, George3, Dria
 Last updated by: teoli,