public class HTMLInputElement extends FormField
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 |
|---|
HTMLInputElement() |
| Modifier and Type | Method and Description |
|---|---|
void |
click()
Click this element.
|
String |
getAlign()
Returns the value of the "align" property.
|
String |
getAlt()
Returns the value of the "alt" property.
|
String |
getBorder()
Gets the "border" attribute.
|
boolean |
getChecked()
Returns the value of the checked property.
|
boolean |
getDefaultChecked()
Returns the input's default checked value, used if the containing form gets reset.
|
String |
getDefaultValue()
Returns the input's default value, used if the containing form gets reset.
|
protected HtmlInput |
getHtmlInputOrDie()
Commodity for
(HtmlInput) getDomNodeOrDie(). |
int |
getMaxLength()
Gets the max length.
|
boolean |
getReadOnly()
Gets the value of "readOnly" attribute.
|
int |
getSelectionEnd()
Gets the value of "selectionEnd" attribute.
|
int |
getSelectionStart()
Gets the value of "selectionStart" attribute.
|
int |
getTextLength()
Gets the value of "textLength" attribute.
|
String |
getType()
Returns the value of the JavaScript attribute "type".
|
protected boolean |
isAttributeName(String name)
Indicates if this is the name of a well defined attribute that can be access as property.
|
protected boolean |
isEndTagForbidden()
Returns whether the end tag is forbidden or not.
|
void |
select()
Select this element.
|
void |
setAlign(String align)
Sets the value of the "align" property.
|
void |
setAlt(String alt)
Returns the value of the "alt" property.
|
void |
setAttribute(String name,
String value)
Uses
setType(String) if attribute's name is type to
replace DOM node as well as long as we have subclasses of HtmlInput. |
void |
setBorder(String border)
Sets the "border" attribute.
|
void |
setChecked(boolean checked)
Sets the checked property.
|
void |
setDefaultChecked(boolean defaultChecked)
Sets the input's default checked value, used if the containing form gets reset.
|
void |
setDefaultValue(String defaultValue)
Sets the input's default value, used if the containing form gets reset.
|
void |
setMaxLength(int length)
Sets the value of "maxLength" attribute.
|
void |
setReadOnly(boolean readOnly)
Sets the value of "readOnly" attribute.
|
void |
setSelectionEnd(int end)
Sets the value of "selectionEnd" attribute.
|
void |
setSelectionRange(int start,
int end)
Sets the selected portion of this input element.
|
void |
setSelectionStart(int start)
Sets the value of "selectionStart" attribute.
|
void |
setType(String newType)
Sets the value of the attribute "type".
|
getDisabled, getName, getOnchange, getValue, setDisabled, setDomNode, setName, setOnchange, setValueaddBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, compareVersions, createEventHandler, createTextRange, dispatchEvent, doComponentRequest, doScroll, fixAttributeName, focus, get, getAccessKey, getAlign, getAll, getAttributeNode, getAttributeNodeNS, getAvailHeight, getAvailWidth, getBoundingClientRect, getBoxObject, getBufferDepth, getCh, getChildren, getChOff, getClassList, getClassName_js, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getDataset, getDefaultStyleDisplay, getDir, getDocument, getDomNodeOrDie, getDomNodeOrNull, getElementsByClassName, getFilters, getHeight, getId, getInnerHTML, getInnerText, getJavaEnabled, getLang, getLanguage, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnsubmit, getOuterHTML, getParentElement, getParentHTMLElement, getPlatform, getPosX, getPosY, getPrefix, getScopeName, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getSpellcheck, getSystemLanguage, getTabIndex, getTagUrn, getTitle, getUniqueID, getUserLanguage, getVAlign, getWidth, getWidthOrHeight, getWithFallback, hasAttribute, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isAncestorOfEventTarget, isComponentInstalled, isHomePage, isLowerCaseInOuterHtml, mergeAttributes, navigateHomePage, parseHtmlSnippet, querySelector, querySelectorAll, readAttributes, removeAttributeNode, removeBehavior, removeExpression, removeNode, scrollIntoView, setAccessKey, setActive, setAlign, setCh, setChOff, setClassName, setColorAttribute, setDir, setExpression, setHomePage, setId, setInnerHTML, setInnerText, setInnerTextImpl, setLang, setLanguage, setOnsubmit, setOuterHTML, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTagUrn, setTextContent, setTitle, setVAlign, setWidthOrHeight, startDownload, toStringcreateAttributesObject, getAttribute, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, getTagName, getText, hasAttributeNS, removeAttribute, removeAttributeNS, selectNodes, selectSingleNode, setAttributeNode, setAttributeNS, setDefaultsfireEvent, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnpropertychange, getOnresize, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnpropertychange, setOnresizeaddEventListener, appendChild, asJavaScriptException, attachEvent, cloneNode, compareDocumentPosition, contains, detachEvent, executeEvent, fireEvent, fireEvent, getBaseName, getChildNodes, getEventHandler, getEventHandlerProp, getFirstChild, getJavaScriptNode, getLastChild, getNamespaceURI, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, getXml, hasChildNodes, hasEventHandlers, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, removeEventListener, replaceChild, setEventHandler, setEventHandlerProp, setNodeValueclone, defineFunctionProperties, defineProperty, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement, 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, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, 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, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, sizepublic void setType(String newType)
newType - the new type to setpublic void setChecked(boolean checked)
checked - True if this input should have the "checked" attribute setprotected HtmlInput getHtmlInputOrDie()
(HtmlInput) getDomNodeOrDie().public boolean getChecked()
public void select()
public void setAttribute(String name, String value)
setType(String) if attribute's name is type to
replace DOM node as well as long as we have subclasses of HtmlInput.
Sets an attribute.
See also
the DOM referencesetAttribute in class HTMLElementname - Name of the attribute to setvalue - Value to set the attribute topublic String getDefaultValue()
public void setDefaultValue(String defaultValue)
defaultValue - the input's default value, used if the containing form gets resetpublic boolean getDefaultChecked()
public void setDefaultChecked(boolean defaultChecked)
defaultChecked - the input's default checked value, used if the containing form gets resetpublic int getTextLength()
public int getSelectionStart()
public void setSelectionStart(int start)
start - selection startpublic int getSelectionEnd()
public void setSelectionEnd(int end)
end - selection endprotected boolean isAttributeName(String name)
isAttributeName in class HTMLElementname - the name (case sensitive!)false if no standard attribute exists with this namepublic int getMaxLength()
public void setMaxLength(int length)
length - the new valuepublic boolean getReadOnly()
public void setReadOnly(boolean readOnly)
readOnly - the new valuepublic void setSelectionRange(int start,
int end)
start - the index of the first character to selectend - the index of the character after the selectionpublic String getAlt()
public void setAlt(String alt)
alt - the valuepublic String getBorder()
public void setBorder(String border)
border - the "border" attributepublic String getAlign()
public void setAlign(String align)
align - the value of the "align" propertypublic void click()
throws IOException
click in class HTMLElementIOException - if this click triggers a page load that encounters problemspublic String getType()
protected boolean isEndTagForbidden()
isEndTagForbidden in class HTMLElementCopyright © 2002–2014 Gargoyle Software Inc.. All rights reserved.