HTMLFormElement : HTMLElement
Return to: HTML DOM Level 2 index

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() : HTMLFormElement

A Form in an HTML Document.

Returns
HTMLFormElement

Visibility
internal

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+
Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

action : String
URL for submitting the form.
Show Details 3.0+ 1.0+ 2.0+ 7.0+ 1.0+
Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

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
Availability

HTML DOM Level 1

elements : HTMLCollection
Array of all of the elements in the form.
Show Details 3.0+ 1.0+ 2.0+ 7.0+ 1.0+
Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

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+
Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

length : Number
Number of elements in the form.
Show Details 6.0+ 1.0+ 6.0+ 7.0+ 1.0+
Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

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+
Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

name : String
Name of the form.
Show Details 6.0+ 1.0+ 6.0+ 7.0+ 1.0+

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/attributes.html

Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

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+
Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

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
void

See Also

Form.reset

Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

submit() : void
Submits the form.
Show Details 4.0+ 1.0+ 3.0+ 7.0+ 1.0+

Returns
void

See Also

Form.submit

Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

References

Form

Availability

HTML DOM Level 1|HTML DOM Level 2|W3C

text_javascript aptana_docs