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

  1. The elements attribute returns a collection of all control elements of the form.
  2. The length attribute contains the number of forms control in the form.
  3. The name attribute contains the name of the form.
  4. The acceptCharset attribute contains a list of character sets supported by the server.
  5. The action attribute contains the server-side form handler.
  6. The enctype attribute is the content type of the submitted form, generally "application/x-www-form-urlencoded".
  7. The method attribute contains the HTTP method used to submit the form.
  8. The target attribute is the frame to render the source in.
  9. Methods

  10. The submit method submits the form.
  11. The reset method restores a form element's default values.

If you have comments or suggestions, email me at mbrady@nist.gov