public class HTMLSelectElement extends HTMLElement
HtmlSelect
.HTMLElement.ProxyDomNode
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
NOT_FOUND
Constructor and Description |
---|
HTMLSelectElement() |
Modifier and Type | Method and Description |
---|---|
void |
add(HTMLOptionElement newOptionObject,
Object beforeOptionObject)
Adds a new item to the list (optionally) before the specified item.
|
Node |
appendChild(Object childObject)
Adds a DOM node to the node.
|
boolean |
checkValidity()
Checks whether the element has any constraints and whether it satisfies them.
|
Object |
get(int index,
org.htmlunit.corejs.javascript.Scriptable start)
Returns the specified indexed property.
|
HtmlSelect |
getDomNodeOrDie()
Returns the DOM node that corresponds to this JavaScript object or throw
an exception if one cannot be found.
|
HTMLFormElement |
getForm()
Returns the value of the JavaScript
form attribute. |
NodeList |
getLabels()
Returns the labels associated with the element.
|
int |
getLength()
Returns the value of the
length property. |
String |
getName()
Returns the value of the JavaScript attribute
name . |
HTMLOptionsCollection |
getOptions()
Returns the value of the
options property. |
int |
getSelectedIndex()
Returns the value of the
selectedIndex property. |
int |
getSize()
Returns the
size attribute. |
String |
getType()
Returns the type of this input.
|
ValidityState |
getValidity() |
String |
getValue()
Returns the actual value of the selected Option.
|
boolean |
getWillValidate() |
void |
initialize()
Initialize the object.
|
Node |
insertBeforeImpl(Object[] args)
Add a DOM node as a child to this node before the referenced node.
|
boolean |
isDisabled()
Returns true if this element is disabled.
|
boolean |
isMultiple()
Returns
true if the multiple attribute is set. |
boolean |
isRequired()
Returns the
required property. |
Object |
item(int index)
Gets the item at the specified index.
|
org.htmlunit.corejs.javascript.Scriptable |
iterator() |
void |
jsConstructor()
JavaScript constructor.
|
void |
put(int index,
org.htmlunit.corejs.javascript.Scriptable start,
Object newValue)
Sets the index property.
|
void |
remove(int index)
Removes option at the specified index.
|
void |
setCustomValidity(String message)
Sets the custom validity message for the element to the specified message.
|
void |
setDisabled(boolean disabled)
Sets whether or not to disable this element.
|
void |
setLength(int newLength)
Removes options by reducing the
length property. |
void |
setMultiple(boolean multiple)
Sets or clears the
multiple attribute. |
void |
setName(String newName)
Sets the value of the JavaScript attribute
name . |
void |
setRequired(boolean required)
Sets the
required property. |
void |
setSelectedIndex(int index)
Sets the value of the
selectedIndex property. |
void |
setSize(String size)
Sets the
size attribute. |
void |
setValue(Object newValue)
Selects the option with the specified value.
|
blur, click, focus, getAccessKey, getAlign, getAttributeNode, getAutofocus, getBoundingClientRect, getCh, getChOff, getContentEditable, getDataset, getDir, getDomNodeOrNull, getEnterKeyHint, getInnerText, getLang, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnabort, getOnanimationcancel, getOnanimationend, getOnanimationiteration, getOnanimationstart, getOnauxclick, getOnblur, getOncancel, getOncanplay, getOncanplaythrough, getOnchange, getOnclick, getOnclose, getOncontextmenu, getOncopy, getOncuechange, getOncut, getOndblclick, getOndrag, getOndragend, getOndragenter, getOndragleave, getOndragover, getOndragstart, getOndrop, getOndurationchange, getOnemptied, getOnended, getOnerror, getOnfocus, getOngotpointercapture, getOninput, getOninvalid, getOnkeydown, getOnkeypress, getOnkeyup, getOnload, getOnloadeddata, getOnloadedmetadata, getOnloadstart, getOnlostpointercapture, getOnmousedown, getOnmouseenter, getOnmouseleave, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnmousewheel, getOnmozfullscreenchange, getOnmozfullscreenerror, getOnpaste, getOnpause, getOnplay, getOnplaying, getOnpointercancel, getOnpointerdown, getOnpointerenter, getOnpointerleave, getOnpointermove, getOnpointerout, getOnpointerover, getOnpointerup, getOnprogress, getOnratechange, getOnreset, getOnresize, getOnscroll, getOnscrollend, getOnseeked, getOnseeking, getOnselect, getOnselectionchange, getOnselectstart, getOnstalled, getOnsubmit, getOnsuspend, getOntimeupdate, getOntoggle, getOntransitioncancel, getOntransitionend, getOntransitionrun, getOntransitionstart, getOnvolumechange, getOnwaiting, getOnwheel, getOuterText, getParentHTMLElement, getPosX, getPosY, getPrefix, getStyle, getTabIndex, getTitle, getVAlign, getWidthOrHeight, isAncestorOfEventTarget, isEndTagForbidden, isHidden, isIsContentEditable, isLowerCaseInOuterHtml, isSpellcheck, setAccessKey, setAlign, setAttribute, setAutofocus, setCh, setChOff, setColorAttribute, setContentEditable, setDir, setDomNode, setEnterKeyHint, setHidden, setInnerText, setLang, setOnabort, setOnanimationcancel, setOnanimationend, setOnanimationiteration, setOnanimationstart, setOnauxclick, setOnblur, setOncancel, setOncanplay, setOncanplaythrough, setOnchange, setOnclick, setOnclose, setOncontextmenu, setOncopy, setOncuechange, setOncut, setOndblclick, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOndurationchange, setOnemptied, setOnended, setOnerror, setOnfocus, setOngotpointercapture, setOninput, setOninvalid, setOnkeydown, setOnkeypress, setOnkeyup, setOnload, setOnloadeddata, setOnloadedmetadata, setOnloadstart, setOnlostpointercapture, setOnmousedown, setOnmouseenter, setOnmouseleave, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnmozfullscreenchange, setOnmozfullscreenerror, setOnpaste, setOnpause, setOnplay, setOnplaying, setOnpointercancel, setOnpointerdown, setOnpointerenter, setOnpointerleave, setOnpointermove, setOnpointerout, setOnpointerover, setOnpointerup, setOnprogress, setOnratechange, setOnreset, setOnresize, setOnscroll, setOnscrollend, setOnseeked, setOnseeking, setOnselect, setOnselectionchange, setOnselectstart, setOnstalled, setOnsubmit, setOnsuspend, setOntimeupdate, setOntoggle, setOntransitioncancel, setOntransitionend, setOntransitionrun, setOntransitionstart, setOnvolumechange, setOnwaiting, setOnwheel, setOuterText, setSpellcheck, setStyle, setTabIndex, setTextContent, setTitle, setVAlign, setWidthOrHeight, toString
after, append, before, closest, createAttributesObject, createEventHandler, getAttribute, getAttributeNodeNS, getAttributeNS, getAttributes, getChildElementCount, getChildren, getClassList, getClassName_js, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getElementsByClassName, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getHTML, getId, getInnerHTML, getInnerHTML, getLastElementChild, getNamespaceURI, getNextElementSibling, getOnbeforecopy, getOnbeforecut, getOnbeforepaste, getOnsearch, getOnwebkitfullscreenchange, getOnwebkitfullscreenerror, getOuterHTML, getParentElement, getPreviousElementSibling, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getTagName, hasAttribute, hasAttributeNS, hasAttributes, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isDisplayNone, matches, mozMatchesSelector, prepend, printChildren, printNode, querySelector, querySelectorAll, releaseCapture, remove, removeAttribute, removeAttributeNode, removeAttributeNS, replaceChildren, replaceWith, scroll, scrollBy, scrollIntoView, scrollIntoViewIfNeeded, scrollTo, setAttributeNode, setAttributeNS, setCapture, setClassName_js, setId, setInnerHTML, setOnbeforecopy, setOnbeforecut, setOnbeforepaste, setOnsearch, setOnwebkitfullscreenchange, setOnwebkitfullscreenerror, setOuterHTML, setScrollLeft, setScrollTop, toggleAttribute, webkitMatchesSelector
after, append, before, cloneNode, compareDocumentPosition, contains, getBaseURI, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getRootNode, getTextContent, hasChildNodes, insertBefore, isEqualNode, isSameNode, lookupPrefix, normalize, prepend, removeChild, replaceChild, replaceChildren, replaceWith, setNodeValue
addEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandler
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getPrototype, getScriptableFor, getWindow, getWindow, getWindowFromTopCallScope, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setParentScope, setupPromise, setupRejectedPromise
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
public void jsConstructor()
jsConstructor
in class HTMLElement
public void initialize()
public HtmlSelect getDomNodeOrDie()
getDomNodeOrDie
in class HTMLElement
public void remove(int index)
index
- the index of the item to removepublic void add(HTMLOptionElement newOptionObject, Object beforeOptionObject)
newOptionObject
- the DomNode to insertbeforeOptionObject
- the DomNode to insert the previous element before (null if at end).public Node appendChild(Object childObject)
appendChild
in class Node
childObject
- the node to add to this nodepublic Node insertBeforeImpl(Object[] args)
insertBeforeImpl
in class Node
args
- the argumentspublic Object item(int index)
index
- the position of the option to retrievepublic String getType()
public HTMLOptionsCollection getOptions()
options
property.options
propertypublic int getSelectedIndex()
selectedIndex
property.selectedIndex
propertypublic void setSelectedIndex(int index)
selectedIndex
property.index
- the new valuepublic String getValue()
getValue
in class HTMLElement
public int getLength()
length
property.length
propertypublic void setLength(int newLength)
length
property.newLength
- the new length
property valuepublic Object get(int index, org.htmlunit.corejs.javascript.Scriptable start)
get
in interface org.htmlunit.corejs.javascript.Scriptable
get
in class org.htmlunit.corejs.javascript.ScriptableObject
index
- the index of the propertystart
- the scriptable object that was originally queried for this propertypublic void put(int index, org.htmlunit.corejs.javascript.Scriptable start, Object newValue)
put
in interface org.htmlunit.corejs.javascript.Scriptable
put
in class org.htmlunit.corejs.javascript.ScriptableObject
index
- the indexstart
- the scriptable object that was originally invoked for this propertynewValue
- the new valuepublic void setValue(Object newValue)
setValue
in class HTMLElement
newValue
- the value of the option to selectpublic int getSize()
size
attribute.size
attributepublic void setSize(String size)
size
attribute.size
- the size
attributepublic boolean isMultiple()
true
if the multiple
attribute is set.true
if the multiple
attribute is setpublic void setMultiple(boolean multiple)
multiple
attribute.multiple
- true
to set the multiple
attribute, false
to clear itpublic NodeList getLabels()
public boolean isRequired()
required
property.required
propertypublic void setRequired(boolean required)
required
property.required
- the new valuepublic String getName()
name
.getName
in class HTMLElement
public void setName(String newName)
name
.setName
in class HTMLElement
newName
- the new namepublic boolean isDisabled()
isDisabled
in class HTMLElement
public void setDisabled(boolean disabled)
setDisabled
in class HTMLElement
disabled
- True if this is to be disabledpublic HTMLFormElement getForm()
form
attribute.getForm
in class HTMLElement
form
attributepublic boolean checkValidity()
public ValidityState getValidity()
public boolean getWillValidate()
public void setCustomValidity(String message)
message
- the new messagepublic org.htmlunit.corejs.javascript.Scriptable iterator()
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.