2 * Copyright (c) 2003 World Wide Web Consortium,
3 * (Massachusetts Institute of Technology, Institut National de
4 * Recherche en Informatique et en Automatique, Keio University). All
5 * Rights Reserved. This program is distributed under the W3C's Software
6 * Intellectual Property License. This program is distributed in the
7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
13 package org.w3c.dom.html2;
16 * The <code>FORM</code> element encompasses behavior similar to a collection
17 * and an element. It provides direct access to the contained form controls
18 * as well as the attributes of the form element. See the FORM element
19 * definition in HTML 4.01.
20 * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
22 public interface HTMLFormElement extends HTMLElement {
24 * Returns a collection of all form control elements in the form.
26 public HTMLCollection getElements();
29 * The number of form controls in the form.
31 public int getLength();
36 public String getName();
40 public void setName(String name);
43 * List of character sets supported by the server. See the accept-charset
44 * attribute definition in HTML 4.01.
46 public String getAcceptCharset();
48 * List of character sets supported by the server. See the accept-charset
49 * attribute definition in HTML 4.01.
51 public void setAcceptCharset(String acceptCharset);
54 * Server-side form handler. See the action attribute definition in HTML
57 public String getAction();
59 * Server-side form handler. See the action attribute definition in HTML
62 public void setAction(String action);
65 * The content type of the submitted form, generally
66 * "application/x-www-form-urlencoded". See the enctype attribute
67 * definition in HTML 4.01. The onsubmit even handler is not guaranteed
68 * to be triggered when invoking this method. The behavior is
69 * inconsistent for historical reasons and authors should not rely on a
72 public String getEnctype();
74 * The content type of the submitted form, generally
75 * "application/x-www-form-urlencoded". See the enctype attribute
76 * definition in HTML 4.01. The onsubmit even handler is not guaranteed
77 * to be triggered when invoking this method. The behavior is
78 * inconsistent for historical reasons and authors should not rely on a
81 public void setEnctype(String enctype);
84 * HTTP method [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] used to submit form. See the method attribute definition
87 public String getMethod();
89 * HTTP method [<a href='http://www.ietf.org/rfc/rfc2616.txt'>IETF RFC 2616</a>] used to submit form. See the method attribute definition
92 public void setMethod(String method);
95 * Frame to render the resource in. See the target attribute definition in
98 public String getTarget();
100 * Frame to render the resource in. See the target attribute definition in
103 public void setTarget(String target);
106 * Submits the form. It performs the same action as a submit button.
108 public void submit();
111 * Restores a form element's default values. It performs the same action