SelectElement Class

SelectElement class

The SelectElement represents a wrapper that is associated with the HTMLSelectElement

public class SelectElement : FormElement<HTMLSelectElement>

Properties

NameDescription
getElementType Gets the type of the element.
getHtmlElement
id { get; set; }Represents the Id attribute of the input element.
[getMultiple]
[setMultiple] If true, multiple OPTION elements may be selected in this SELECT. See the multiple attribute definition in HTML 4.01.
name { get; set; }Represent the name attribute of the input element.
getOptions Returns a list of options
getSelectedOptions Returns a list of selected options
getType The type of this form control. This is the String “select-multiple” when the multiple attribute is true and the String “select-one” when false.
value { get; set; }On getting, must return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.

Methods

NameDescription
selectItems(params int[])This methods allows to select multiple options by their indexes.
selectItems(params String[])This methods allows to select multiple options by their values.

See Also