JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.javascript.host.html

Class HTMLOptionElement

    • Constructor Detail

      • HTMLOptionElement

        public HTMLOptionElement()
    • Method Detail

      • jsConstructor

        public void jsConstructor(Object newText,
         String newValue,
         boolean defaultSelected,
         boolean selected)
        JavaScript constructor.
        Parameters:
        newText - the text
        newValue - the value
        defaultSelected - Whether the option is initially selected
        selected - the current selection state of the option
      • jsConstructorOption

        public void jsConstructorOption(Object newText,
         String newValue,
         boolean defaultSelected,
         boolean selected)
        JavaScript constructor.
        Parameters:
        newText - the text
        newValue - the value
        defaultSelected - Whether the option is initially selected
        selected - the current selection state of the option
      • getValue

        public String getValue()
        Returns the value of the value property.
        Overrides:
        getValue in class HTMLElement
        Returns:
        the value property
      • setValue

        public void setValue(String newValue)
        Sets the value of the value property.
        Parameters:
        newValue - the value property
      • getText

        public String getText()
        Returns the value of the text property.
        Returns:
        the text property
      • setText

        public void setText(String newText)
        Sets the value of the text property.
        Parameters:
        newText - the text property
      • isSelected

        public boolean isSelected()
        Returns the value of the selected property.
        Returns:
        the text property
      • setSelected

        public void setSelected(boolean selected)
        Sets the value of the selected property.
        Parameters:
        selected - the new selected property
      • isDefaultSelected

        public boolean isDefaultSelected()
        Returns the value of the defaultSelected property.
        Returns:
        the text property
      • getLabel

        public String getLabel()
        Returns the value of the label property.
        Returns:
        the label property
      • setLabel

        public void setLabel(String label)
        Sets the value of the label property.
        Parameters:
        label - the new label property
      • isDisabled

        public boolean isDisabled()
        Returns true if this element is disabled. Overridden to modify browser configurations.
        Overrides:
        isDisabled in class HTMLElement
        Returns:
        true if this element is disabled
      • setDisabled

        public void setDisabled(boolean disabled)
        Sets whether or not to disable this element. Overridden to modify browser configurations.
        Overrides:
        setDisabled in class HTMLElement
        Parameters:
        disabled - True if this is to be disabled
      • getIndex

        public int getIndex()
        Returns the index property.
        Returns:
        the index property
      • removeAttribute

        public void removeAttribute(String name)
        Removes the specified attribute.
        Overrides:
        removeAttribute in class Element
        Parameters:
        name - the name of the attribute to remove
      • 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
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /