APIdia Launch Partner
Top Description Methods
org.w3c.dom.html

public Interface HTMLFormElement

extends HTMLElement

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. See the FORM element definition in HTML 4.0.

See also the Document Object Model (DOM) Level 2 Specification.

Since
1.4, DOM Level 2

Method Summary

Modifier and TypeMethod and Description
public String
getAcceptCharset()

List of character sets supported by the server.

public String
getAction()

Server-side form handler.

public HTMLCollection
getElements()

Returns a collection of all control elements in the form.

public String
getEnctype()

The content type of the submitted form, generally "application/x-www-form-urlencoded".

public int
getLength()

The number of form controls in the form.

public String
getMethod()

HTTP method used to submit form.

public String
getName()

Names the form.

public String
getTarget()

Frame to render the resource in. See the target attribute definition in HTML 4.0.

public void
reset()

Restores a form element's default values.

public void
setAcceptCharset(String acceptCharset)

public void
setAction(String action)

public void
setEnctype(String enctype)

public void
setMethod(String method)

public void
public void
setTarget(String target)

public void
submit()

Submits the form.

Inherited from org.w3c.dom.html.HTMLElement:
getClassNamegetDirgetIdgetLanggetTitlesetClassNamesetDirsetIdsetLangsetTitle

Method Detail

getAcceptCharsetback to summary
public String getAcceptCharset()

List of character sets supported by the server. See the accept-charset attribute definition in HTML 4.0.

getActionback to summary
public String getAction()

Server-side form handler. See the action attribute definition in HTML 4.0.

getElementsback to summary
public HTMLCollection getElements()

Returns a collection of all control elements in the form.

getEnctypeback to summary
public String getEnctype()

The content type of the submitted form, generally "application/x-www-form-urlencoded". See the enctype attribute definition in HTML 4.0.

getLengthback to summary
public int getLength()

The number of form controls in the form.

getMethodback to summary
public String getMethod()

HTTP method used to submit form. See the method attribute definition in HTML 4.0.

getNameback to summary
public String getName()

Names the form.

getTargetback to summary
public String getTarget()

Frame to render the resource in. See the target attribute definition in HTML 4.0.

resetback to summary
public void reset()

Restores a form element's default values. It performs the same action as a reset button.

setAcceptCharsetback to summary
public void setAcceptCharset(String acceptCharset)
setActionback to summary
public void setAction(String action)
setEnctypeback to summary
public void setEnctype(String enctype)
setMethodback to summary
public void setMethod(String method)
setNameback to summary
public void setName(String name)
setTargetback to summary
public void setTarget(String target)
submitback to summary
public void submit()

Submits the form. It performs the same action as a submit button.