Availability
DOM Level 1 HTML
Inherits from/Overrides
Node
Properties
readonly HTMLCollection elements
An array
(HTMLCollection) of all elements in the form.
readonly long length
The number
of form elements in the form. This is the same value as
elements.length.
In addition to the properties above, HTMLFormElement also defines the
properties in the following table, which correspond directly to HTML
attributes.
Property | Attribute | Description |
|---|---|---|
String acceptCharset | acceptcharset | Character sets the server can accept |
String action | action | URL of the form handler |
String enctype | enctype | Encoding of the form |
String method | method | HTTP method used for form submission |
String name | name | Name of the form |
String target | target | Frame or window name for form submission results |
Methods
reset( )
Resets all form elements to their default values. submit( )
Submits the form.
Description
This interface represents a <form> element
in an HTML document. The elements property is an
HTMLCollection that provides convenient access to all elements of the
form. The submit( ) and reset(
) methods allow a form to be submitted or reset under
program control.
See the Form object in the client-side reference section for more
details.
See Also
Form object in the client-side reference section
Type of
HTMLButtonElement.form, HTMLFieldSetElement.form,HTMLInputElement.form, HTMLIsIndexElement.form,HTMLLabelElement.form, HTMLLegendElement.form,HTMLObjectElement.form, HTMLOptionElement.form,HTMLSelectElement.form, HTMLTextAreaElement.form
•
Table of Contents
•
Index
•
Reviews
•
Examples
•
Reader Reviews
•
Errata
JavaScript: The Definitive Guide, 4th Edition
By
David Flanagan
Publisher
: O'Reilly
Pub Date
: November 2001
ISBN
: 0-596-00048-0
Pages
: 936
Slots
: 1
This fourth edition of the definitive reference to
JavaScript, a scripting language that can be embedded
directly in web pages, covers the latest version of the
language, JavaScript 1.5, as supported by Netscape 6 and
Internet Explorer 6. The book also provides complete
coverage of the W3C DOM standard (Level 1 and Level 2),
while retaining material on the legacy Level 0 DOM for
backward compatibility.