public class HTMLSelectElement extends FormField
HtmlSelect.HTMLElement.ProxyDomNodeBEHAVIOR_ID_CLIENT_CAPS, BEHAVIOR_ID_DOWNLOAD, BEHAVIOR_ID_HOMEPAGEATTRIBUTE_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| Constructor and Description |
|---|
HTMLSelectElement()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(HTMLOptionElement newOptionObject,
Object beforeOptionObject)
Adds a new item to the list (optionally) before the specified item.
|
Object |
appendChild(Object childObject)
Adds a DOM node to the node.
|
Object |
get(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
Returns the specified indexed property.
|
AbstractList |
getLabels()
Returns the labels associated with the element.
|
int |
getLength()
Returns the value of the
length property. |
boolean |
getMultiple()
Returns
true if the multiple attribute is set. |
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.
|
String |
getValue()
Returns the actual value of the selected Option.
|
void |
initialize()
Initialize the object.
|
Object |
insertBeforeImpl(Object[] args)
Add a DOM node as a child to this node before the referenced node.
|
Object |
item(int index)
Gets the item at the specified index.
|
void |
put(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start,
Object newValue)
Sets the index property.
|
void |
remove(int index)
Removes option at the specified index.
|
void |
setLength(int newLength)
Removes options by reducing the
length property. |
void |
setMultiple(boolean multiple)
Sets or clears the
multiple attribute. |
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.
|
getDisabled, getName, getOnchange, setDisabled, setDomNode, setName, setOnchangeaddBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, click, compareVersions, createTextRange, doComponentRequest, focus, getAccessKey, getAlign, getAttributeNode, getAttributeNodeNS, getAvailHeight, getAvailWidth, getBoundingClientRect, getBufferDepth, getCh, getChildren, getChOff, getClassList, getClassName_js, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getColorDepth, getComponentVersion, getConnectionType, getContentEditable, getCookieEnabled, getCpuClass, getDataset, getDefaultStyleDisplay, getDir, getDomNodeOrDie, getDomNodeOrNull, getElementsByClassName, getHeight, getId, getInnerHTML, getInnerText, getIsContentEditable, getJavaEnabled, getLang, getLanguage, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnsubmit, getOuterHTML, getParentElement, getParentHTMLElement, getPlatform, getPosX, getPosY, getPrefix, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getSpellcheck, getSystemLanguage, getTabIndex, getTitle, getUniqueID, getUserLanguage, getVAlign, getWidth, getWidthOrHeight, getWithFallback, hasAttribute, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isAncestorOfEventTarget, isComponentInstalled, isEndTagForbidden, isHomePage, isLowerCaseInOuterHtml, mergeAttributes, navigateHomePage, parseHtmlSnippet, readAttributes, releaseCapture, removeAttributeNode, removeBehavior, removeNode, scrollIntoView, setAccessKey, setActive, setAlign, setAttribute, setCapture, setCh, setChOff, setClassName_js, setColorAttribute, setContentEditable, setDir, setHomePage, setId, setInnerHTML, setInnerText, setInnerTextImpl, setLang, setLanguage, setOnsubmit, setOuterHTML, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTagUrn, setTextContent, setTitle, setVAlign, setWidthOrHeight, startDownload, toStringcreateAttributesObject, createEventHandler, get, getAttribute, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, getTagName, hasAttributeNS, querySelector, querySelectorAll, removeAttribute, removeAttributeNS, setAttributeNode, setAttributeNS, setDefaultsfireEvent, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOninput, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnpropertychange, getOnresize, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOninput, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnpropertychange, setOnresizeasJavaScriptException, cloneNode, compareDocumentPosition, contains, detachEvent, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getNamespaceURI, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, hasChildNodes, insertBefore, isSameNode, normalize, remove, removeChild, replaceChild, setNodeValueaddEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventHandlerProp, getEventListenersContainer, hasEventHandlers, removeEventListener, setEventHandler, setEventHandlerPropclone, equivalentValues, getBrowserVersion, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElementdefineFunctionProperties, defineProperty, getClassName, setClassName, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, sizepublic void initialize()
public void remove(int index)
index - the index of the item to removepublic void add(HTMLOptionElement newOptionObject, Object beforeOptionObject)
newOptionObject - the DomNode to insertbeforeOptionObject - for Firefox: the DomNode to insert the previous element before (null if at end),
for Internet Explorer: the index where the element should be placed (optional).public Object appendChild(Object childObject)
appendChild in class NodechildObject - the node to add to this nodepublic Object insertBeforeImpl(Object[] args)
insertBeforeImpl in class Nodeargs - 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()
public int getLength()
length property.length propertypublic void setLength(int newLength)
length property.newLength - the new length property valuepublic Object get(int index, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
get in interface net.sourceforge.htmlunit.corejs.javascript.Scriptableget in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObjectindex - the index of the propertystart - the scriptable object that was originally queried for this propertypublic void put(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start,
Object newValue)
put in interface net.sourceforge.htmlunit.corejs.javascript.Scriptableput in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObjectindex - the indexstart - the scriptable object that was originally invoked for this propertynewValue - the new valuepublic void setValue(Object newValue)
public int getSize()
size attribute.size attributepublic void setSize(String size)
size attribute.size - the size attributepublic boolean getMultiple()
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 AbstractList getLabels()
Copyright © 2002–2016 Gargoyle Software Inc.. All rights reserved.