public class HTMLInputElement extends FormField
HTMLInputElement.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()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkValidity()
Checks whether the element has any constraints and whether it satisfies them.
|
void |
click()
Click this element.
|
TextRange |
createTextRange()
Creates a new TextRange object for this element.
|
String |
getAccept()
Returns the
accept attribute. |
String |
getAlign()
Returns the value of the
align property. |
String |
getAlt()
Returns the value of the
alt property. |
String |
getAttribute(String attributeName,
Integer flags)
Returns the value of the specified attribute.
|
String |
getAutocomplete()
Returns the
autocomplete attribute. |
String |
getBorder()
Gets the
border attribute. |
String |
getDefaultValue()
Returns the input's default value, used if the containing form gets reset.
|
HtmlInput |
getDomNodeOrDie()
Returns the DOM node that corresponds to this JavaScript object or throw
an exception if one cannot be found.
|
Object |
getFiles()
Returns the
files property. |
int |
getHeight()
Returns the
height property. |
AbstractList |
getLabels()
Returns the labels associated with the element.
|
String |
getMax()
Gets the
max property. |
int |
getMaxLength()
Gets the max length.
|
String |
getMin()
Gets the
min property. |
int |
getMinLength()
Gets the
minLength. |
String |
getPlaceholder()
Returns the
placeholder attribute. |
Object |
getSelectionEnd()
Gets the value of
selectionEnd attribute. |
Object |
getSelectionStart()
Gets the value of
selectionStart attribute. |
String |
getSize()
Returns the
size attribute. |
String |
getSrc()
Returns the value of the
src attribute. |
String |
getStep()
Gets the
step property. |
int |
getTextLength()
Gets the value of
textLength attribute. |
String |
getType()
Returns the
type property. |
String |
getValue()
Returns the value of the JavaScript attribute
value. |
int |
getWidth()
Returns the
width property. |
boolean |
isChecked()
Returns the value of the checked property.
|
boolean |
isDefaultChecked()
Returns the input's default checked value, used if the containing form gets reset.
|
protected boolean |
isEndTagForbidden()
Returns whether the end tag is forbidden or not.
|
boolean |
isReadOnly()
Gets the value of
readOnly attribute. |
boolean |
isRequired()
Returns the
required property. |
void |
select()
Select this element.
|
void |
setAccept(String accept)
Sets the
accept attribute. |
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 |
setAutocomplete(String autocomplete)
Sets the
autocomplete attribute. |
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 |
setHeight(int height)
Sets the
height property. |
void |
setMax(String max)
Sets the
max property. |
void |
setMaxLength(int length)
Sets the value of
maxLength attribute. |
void |
setMin(String min)
Sets the
min property. |
void |
setMinLength(int length)
Sets the value of
minLength attribute. |
void |
setPlaceholder(String placeholder)
Sets the
placeholder attribute. |
void |
setReadOnly(boolean readOnly)
Sets the value of
readOnly attribute. |
void |
setRequired(boolean required)
Sets the
required property. |
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 |
setSize(String size)
Sets the
size attribute. |
void |
setStep(String step)
Sets the
step property. |
void |
setType(String newType)
Sets the value of the attribute
type. |
void |
setValue(Object newValue)
Sets the value of the JavaScript attribute
value. |
void |
setWidth(int width)
Sets the
width property. |
getForm, getName, isDisabled, setDisabled, setDomNode, setNameaddBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, compareVersions, contains, doComponentRequest, focus, getAccessKey, getAlign, getAttributeNode, getAvailHeight, getAvailWidth, getBoundingClientRect, getBufferDepth, getCh, getChildren, getChOff, getClassList, getClassName_js, getColorDepth, getComponentVersion, getContentEditable, getCpuClass, getCurrentStyle, getDataset, getDir, getDomNodeOrNull, getElementsByClassName, getId, getInnerHTML, getInnerText, getLang, getLanguage, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnabort, getOnactivate, getOnanimationend, getOnanimationiteration, getOnanimationstart, getOnauxclick, getOnbeforeactivate, getOnbeforecopy, getOnbeforecut, getOnbeforedeactivate, getOnbeforepaste, getOnblur, getOncancel, getOncanplay, getOncanplaythrough, getOnchange, getOnclick, getOnclose, getOncontextmenu, getOncopy, getOncuechange, getOncut, getOndblclick, getOndeactivate, getOndrag, getOndragend, getOndragenter, getOndragexit, getOndragleave, getOndragover, getOndragstart, getOndrop, getOndurationchange, getOnemptied, getOnended, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOngotpointercapture, getOnhelp, getOninput, getOninvalid, getOnkeydown, getOnkeypress, getOnkeyup, getOnload, getOnloadeddata, getOnloadedmetadata, getOnloadend, getOnloadstart, getOnlostpointercapture, getOnmousedown, getOnmouseenter, getOnmouseleave, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnmousewheel, getOnmozfullscreenchange, getOnmozfullscreenerror, getOnmscontentzoom, getOnmsmanipulationstatechanged, getOnpaste, getOnpause, getOnplay, getOnplaying, getOnpointercancel, getOnpointerdown, getOnpointerenter, getOnpointerleave, getOnpointermove, getOnpointerout, getOnpointerover, getOnpointerup, getOnprogress, getOnratechange, getOnreset, getOnresize, getOnscroll, getOnseeked, getOnseeking, getOnselect, getOnselectstart, getOnshow, getOnstalled, getOnsubmit, getOnsuspend, getOntimeupdate, getOntoggle, getOntransitionend, getOnvolumechange, getOnwaiting, getOnwebkitanimationend, getOnwebkitanimationiteration, getOnwebkitanimationstart, getOnwebkittransitionend, getOnwheel, getOuterHTML, getParentElement, getParentHTMLElement, getPlatform, getPosX, getPosY, getPrefix, getRuntimeStyle, getStyle, getSystemLanguage, getTabIndex, getTitle, getUniqueID, getUserLanguage, getVAlign, getWidthOrHeight, hasAttribute, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isAncestorOfEventTarget, isComponentInstalled, isCookieEnabled, isHidden, isHomePage, isIsContentEditable, isJavaEnabled, isLowerCaseInOuterHtml, isSpellcheck, mergeAttributes, navigateHomePage, readAttributes, releaseCapture, removeBehavior, removeNode, scrollIntoView, setAccessKey, setActive, setAlign, setCapture, setCh, setChOff, setClassName_js, setColorAttribute, setContentEditable, setDir, setHidden, setHomePage, setId, setInnerHTML, setInnerText, setInnerTextImpl, setLang, setLanguage, setOnabort, setOnactivate, setOnanimationend, setOnanimationiteration, setOnanimationstart, setOnauxclick, setOnbeforeactivate, setOnbeforecopy, setOnbeforecut, setOnbeforedeactivate, setOnbeforepaste, setOnblur, setOncancel, setOncanplay, setOncanplaythrough, setOnchange, setOnclick, setOnclose, setOncontextmenu, setOncopy, setOncuechange, setOncut, setOndblclick, setOndeactivate, setOndrag, setOndragend, setOndragenter, setOndragexit, setOndragleave, setOndragover, setOndragstart, setOndrop, setOndurationchange, setOnemptied, setOnended, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOngotpointercapture, setOnhelp, setOninput, setOninvalid, setOnkeydown, setOnkeypress, setOnkeyup, setOnload, setOnloadeddata, setOnloadedmetadata, setOnloadend, setOnloadstart, setOnlostpointercapture, setOnmousedown, setOnmouseenter, setOnmouseleave, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnmozfullscreenchange, setOnmozfullscreenerror, setOnmscontentzoom, setOnmsmanipulationstatechanged, setOnpaste, setOnpause, setOnplay, setOnplaying, setOnpointercancel, setOnpointerdown, setOnpointerenter, setOnpointerleave, setOnpointermove, setOnpointerout, setOnpointerover, setOnpointerup, setOnprogress, setOnratechange, setOnreset, setOnresize, setOnscroll, setOnseeked, setOnseeking, setOnselect, setOnselectstart, setOnshow, setOnstalled, setOnsubmit, setOnsuspend, setOntimeupdate, setOntoggle, setOntransitionend, setOnvolumechange, setOnwaiting, setOnwebkitanimationend, setOnwebkitanimationiteration, setOnwebkitanimationstart, setOnwebkittransitionend, setOnwheel, setOuterHTML, setSpellcheck, setStyle, setTabIndex, setTagUrn, setTextContent, setTitle, setVAlign, setWidthOrHeight, startDownload, toStringafter, before, createAttributesObject, createEventHandler, get, getAttributeNodeNS, getAttributeNS, getAttributes, getChildElementCount, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getInnerHTML, getLastElementChild, getNamespaceURI, getNextElementSibling, getOnmsgesturechange, getOnmsgesturedoubletap, getOnmsgestureend, getOnmsgesturehold, getOnmsgesturestart, getOnmsgesturetap, getOnmsgotpointercapture, getOnmsinertiastart, getOnmslostpointercapture, getOnmspointercancel, getOnmspointerdown, getOnmspointerenter, getOnmspointerleave, getOnmspointermove, getOnmspointerout, getOnmspointerover, getOnmspointerup, getOnsearch, getOnwebkitfullscreenchange, getOnwebkitfullscreenerror, getPreviousElementSibling, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getTagName, hasAttributeNS, hasAttributes, isDisplayNone, matches, mozMatchesSelector, msMatchesSelector, printChildren, querySelector, querySelectorAll, remove, removeAttribute, removeAttributeNode, removeAttributeNS, replaceWith, scrollIntoViewIfNeeded, setAttributeNode, setAttributeNS, setDefaults, setOnmsgesturechange, setOnmsgesturedoubletap, setOnmsgestureend, setOnmsgesturehold, setOnmsgesturestart, setOnmsgesturetap, setOnmsgotpointercapture, setOnmsinertiastart, setOnmslostpointercapture, setOnmspointercancel, setOnmspointerdown, setOnmspointerenter, setOnmspointerleave, setOnmspointermove, setOnmspointerout, setOnmspointerover, setOnmspointerup, setOnsearch, setOnwebkitfullscreenchange, setOnwebkitfullscreenerror, setScrollLeft, setScrollTop, webkitMatchesSelectorappendChild, asJavaScriptException, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, hasChildNodes, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, replaceChild, setNodeValueaddEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandlerclone, equivalentValues, getBrowserVersion, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElementdefineFunctionProperties, defineProperty, getClassName, put, setClassName, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, sizepublic String getType()
type property.type propertypublic void setType(String newType)
type.
Note: this replace the DOM node with a new one.newType - the new type to setpublic void setValue(Object newValue)
value.public void setChecked(boolean checked)
checked - True if this input should have the checked attribute setpublic HtmlInput getDomNodeOrDie()
getDomNodeOrDie in class HTMLElementpublic boolean isChecked()
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 isDefaultChecked()
public void setDefaultChecked(boolean defaultChecked)
defaultChecked - the input's default checked value, used if the containing form gets resetpublic int getTextLength()
textLength attribute.public Object getSelectionStart()
selectionStart attribute.public void setSelectionStart(int start)
selectionStart attribute.start - selection startpublic Object getSelectionEnd()
selectionEnd attribute.public void setSelectionEnd(int end)
selectionEnd attribute.end - selection endpublic int getMaxLength()
public void setMaxLength(int length)
maxLength attribute.length - the new valuepublic int getMinLength()
minLength.minLengthpublic void setMinLength(int length)
minLength attribute.length - the new valuepublic String getMin()
min property.min propertypublic void setMin(String min)
min property.min - the min propertypublic String getMax()
max property.max propertypublic void setMax(String max)
max property.max - the max propertypublic String getStep()
step property.step propertypublic void setStep(String step)
step property.step - the step propertypublic boolean isReadOnly()
readOnly attribute.public void setReadOnly(boolean readOnly)
readOnly attribute.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()
alt property.alt propertypublic void setAlt(String alt)
alt property.alt - the valuepublic String getBorder()
border attribute.border attributepublic void setBorder(String border)
border attribute.border - the border attributepublic String getAlign()
align property.align propertypublic void setAlign(String align)
align property.align - the value of the align propertypublic String getSrc()
src attribute.src attributepublic String getValue()
value.public String getAttribute(String attributeName, Integer flags)
getAttribute in class ElementattributeName - attribute nameflags - IE-specific flags (see the MSDN documentation for more info)null if the attribute is not definedpublic void click()
throws IOException
click in class HTMLElementIOException - if this click triggers a page load that encounters problemsprotected boolean isEndTagForbidden()
isEndTagForbidden in class HTMLElementpublic boolean isRequired()
required property.required propertypublic void setRequired(boolean required)
required property.required - the new valuepublic String getSize()
size attribute.size attributepublic void setSize(String size)
size attribute.size - the new size valuepublic String getAccept()
accept attribute.accept attributepublic void setAccept(String accept)
accept attribute.accept - the new accept valuepublic String getAutocomplete()
autocomplete attribute.autocomplete attributepublic void setAutocomplete(String autocomplete)
autocomplete attribute.autocomplete - the new autocomplete valuepublic Object getFiles()
files property.files propertypublic String getPlaceholder()
placeholder attribute.placeholder attributepublic void setPlaceholder(String placeholder)
placeholder attribute.placeholder - the new placeholder valuepublic int getWidth()
width property.getWidth in class HTMLElementwidth propertypublic void setWidth(int width)
width property.width - the width propertypublic int getHeight()
height property.getHeight in class HTMLElementheight propertypublic void setHeight(int height)
height property.height - the height propertypublic AbstractList getLabels()
public boolean checkValidity()
public TextRange createTextRange()
createTextRange in class ElementCopyright © 2002–2019 Gargoyle Software Inc.. All rights reserved.