Form.length

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

							form.length

Description

The length property of the Form object represents the number of elements within a form.

Note

This property works the same as the elements.length property.

Example

Listing 7.260 shows an example of how the length property is used to determine the number of elements in the document. The showNumElements() function informs the user of the form length, which represents the number of form elements.

Listing 7.260 Using the Form.length Property
<html>
<head>
<title> Using the length property of the Form object</title>
</head>
<body>
							 <script language="JavaScript"> <!-- Hide // function displays an alert box indicating the number of elements in ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.