org.w3c.dom.html

Interface HTMLLabelElement

public interface HTMLLabelElement extends HTMLElement

Form field label text. See the LABEL element definition in HTML 4.0.
Method Summary
StringgetAccessKey()
A single character access key to give access to the form control.
HTMLFormElementgetForm()
Returns the FORM element containing this control.Returns null if this control is not within the context of a form.
StringgetHtmlFor()
This attribute links this label with another form controlby id attribute.
voidsetAccessKey(String accessKey)
voidsetHtmlFor(String htmlFor)

Method Detail

getAccessKey

public String getAccessKey()
A single character access key to give access to the form control. See the accesskey attribute definition in HTML 4.0.

getForm

public HTMLFormElement getForm()
Returns the FORM element containing this control.Returns null if this control is not within the context of a form.

getHtmlFor

public String getHtmlFor()
This attribute links this label with another form controlby id attribute. See the for attribute definition in HTML 4.0.

setAccessKey

public void setAccessKey(String accessKey)

setHtmlFor

public void setHtmlFor(String htmlFor)