HTMLFormElement Interface
The FORM element encompasses behavior similar to a collection and an element. It provides direct access to the contained input elements as well as the attributes of the form element.
IDL Definition
Interface HTMLFormElement : HTMLElement {
readonly attribute HTMLCollection elements;
readonly attribute long length;
attribute DOMString acceptCharset;
attribute DOMString action;
attribute DOMString text;
attribute DOMString enctype;
attribute DOMString method;
attribute DOMString target;
void submit();
void reset()
};
Semantic Requirements
- The elements attribute returns a collection of all control elements of the form.
- The length attribute contains the number of forms control in the form.
- The name attribute contains the name of the form.
- The acceptCharset attribute contains a list of character sets supported by the server.
- The action attribute contains the server-side form handler.
- The enctype attribute is the content type of the submitted form, generally "application/x-www-form-urlencoded".
- The method attribute contains the HTTP method used to submit the form.
- The target attribute is the frame to render the source in.
Methods
- The submit method submits the form.
- The reset method restores a form element's default values.
If you have comments or suggestions, email me at mbrady@nist.gov