The HTMLFormElement.length read-only property returns the number of controls in the <form> element. SyntaxEdit integer = form.length ExampleEdit if (document.getElementById("form1").length > 1) { // more than one form control here } SpecificationsEdit HTML 5, Section 4.10.3, The form Element DOM Level 2: length