HTMLFormElement : HTMLElement

A Form in an HTML Document.

Browser/User Agent Support

IEMozillaNetscapeOperaSafariNetscapte
4.0+1.0+3.0+7.0+1.0+no

Constructors

ConstructorIEMozillaNetscapeOperaSafariNetscapte
A Form in an HTML Document.
4.0+1.0+3.0+7.0+1.0+no
 

Properties

PropertyIEMozillaNetscapeOperaSafariNetscapte
Comma or space-delimited list of character encodings that are accepted by the server processing the form.
5.0+1.0+6.0+7.0+1.0+no
 
URL for submitting the form.
3.0+1.0+2.0+7.0+1.0+no
 
Specifies whether form autocompletion, which automatically completes the fields on a form after the user has typed enough letters, is on or off.
5.0+nonononono
 
Array of all of the elements in the form.
3.0+1.0+2.0+7.0+1.0+no
 
Specifies the MIME type for the element data being sent to the server.
6.0+1.0+6.0+7.0+1.0+no
 
Number of elements in the form.
6.0+1.0+6.0+7.0+1.0+no
 
Specifies the method to use to transfer form data to the server.
6.0+1.0+6.0+7.0+1.0+no
 
Name of the form.
6.0+1.0+6.0+7.0+1.0+no
 
Target window to use for displaying the result from submitting the form.
6.0+1.0+6.0+7.0+1.0+no
 

Methods

MethodIEMozillaNetscapeOperaSafariNetscapte
Resets the values of all of the elements in the form to their original values.
4.0+1.0+3.0+7.0+1.0+no
 
Submits the form.
4.0+1.0+3.0+7.0+1.0+no
 

References

Form

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Constructor Detail

HTMLFormElement HTMLFormElement()

A Form in an HTML Document.

Visibility
internal

Property Detail

String acceptCharset

Comma or space-delimited list of character encodings that are accepted by the server processing the form.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String action

URL for submitting the form.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String autocomplete

Specifies whether form autocompletion, which automatically completes the fields on a form after the user has typed enough letters, is on or off.

Availability

HTML DOM Level 1

HTMLCollection elements - read only

Array of all of the elements in the form.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String enctype

Specifies the MIME type for the element data being sent to the server.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Number length - read only

Number of elements in the form.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String method

Specifies the method to use to transfer form data to the server.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

String name

Name of the form.

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

String target

Target window to use for displaying the result from submitting the form.

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

Method Detail

reset() : void

Resets the values of all of the elements in the form to their original values.

See Also

Form.reset

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C

submit() : void

Submits the form.

See Also

Form.submit

Availability

HTML DOM Level 1 | HTML DOM Level 2 | W3C