Class HTMLLabelElement

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

    public class HTMLLabelElement
    extends HTMLElement
    A JavaScript object for HTMLLabelElement.
    See Also:
    Serialized Form
    • Constructor Detail

      • HTMLLabelElement

        public HTMLLabelElement()
        Creates an instance.
    • Method Detail

      • getHtmlFor

        public java.lang.String getHtmlFor()
        Retrieves the object to which the given label object is assigned.
        Returns:
        the identifier of the element to which the label element is assigned
      • setHtmlFor

        public void setHtmlFor​(java.lang.String id)
        Sets or retrieves the object to which the given label object is assigned.
        Parameters:
        id - Specifies the identifier of the element to which the label element is assigned
        See Also:
        MSDN Documentation
      • getControl

        public HTMLElement getControl()
        Returns:
        the HTMLElement labeled by the given label object
      • getForm

        public HTMLFormElement getForm()
        Returns the value of the JavaScript form attribute.
        Overrides:
        getForm in class HTMLElement
        Returns:
        the value of the JavaScript form attribute