A Form in an HTML Document.
Platform Support
| IE | Mozilla | Netscape | Opera | Safari | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|---|
Constructors
| Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
|---|---|---|---|---|---|---|---|---|
|
HTMLFormElement Constructor() : HTMLFormElement
A Form in an HTML Document.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ | ||
HTMLFormElement() : HTMLFormElementA Form in an HTML Document. Returns
|
||||||||
Properties
| Property | Action | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|---|
|
acceptCharset
: String
Comma or space-delimited list of character encodings that are accepted by the server processing the form.
|
Show Details | 5.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
action
: String
URL for submitting the form.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
|
autocomplete
: String
Specifies whether form autocompletion, which automatically completes the fields on a form after the user has typed enough
letters, is on or off.
|
Show Details | 5.0+ | no | no | no | no |
|
||||||
|
elements
: HTMLCollection
Array of all of the elements in the form.
|
Show Details | 3.0+ | 1.0+ | 2.0+ | 7.0+ | 1.0+ |
|
||||||
|
enctype
: String
Specifies the MIME type for the element data being sent to the server.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
length
: Number
Number of elements in the form.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
method
: String
Specifies the method to use to transfer form data to the server.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
name
: String
Name of the form.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
|
target
: String
Target window to use for displaying the result from submitting the form.
|
Show Details | 6.0+ | 1.0+ | 6.0+ | 7.0+ | 1.0+ |
|
||||||
Functions
| Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||
|---|---|---|---|---|---|---|---|---|
|
reset() : void
Resets the values of all of the elements in the form to their original values.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ | ||
|
Returns
|
||||||||
|
submit() : void
Submits the form.
|
Show Details | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ | ||
|
Returns
|
||||||||
References
Availability
HTML DOM Level 1|HTML DOM Level 2|W3C
