public class HTMLFormElement extends HTMLElement implements net.sourceforge.htmlunit.corejs.javascript.Function
HTMLFormElement
.HTMLElement.ProxyDomNode
BEHAVIOR_ID_CLIENT_CAPS, BEHAVIOR_ID_DOWNLOAD, BEHAVIOR_ID_HOMEPAGE
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
Constructor and Description |
---|
HTMLFormElement()
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
Object |
call(net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args) |
boolean |
checkValidity()
Checks whether the element has any constraints and whether it satisfies them.
|
net.sourceforge.htmlunit.corejs.javascript.Scriptable |
construct(net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
Object[] args) |
boolean |
dispatchEvent(Event event)
Dispatches an event into the event system (standards-conformant browsers only).
|
Object |
get(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
Returns the specified indexed property.
|
String |
getAction()
Returns the value of the property
action . |
HTMLCollection |
getElements()
Returns the value of the property
elements . |
String |
getEncoding()
Returns the value of the property
encoding . |
String |
getEnctype()
Returns the value of the property
enctype . |
HtmlForm |
getHtmlForm() |
int |
getLength()
Returns the value of the property
length . |
String |
getMethod()
Returns the value of the property
method . |
String |
getName()
Returns the value of the property
name . |
String |
getTarget()
Returns the value of the property
target . |
protected Object |
getWithPreemption(String name)
Overridden to allow the retrieval of certain form elements by ID or name.
|
Object |
item(Object index,
Object subIndex)
Retrieves a form object or an object from an elements collection.
|
void |
requestSubmit(Object submitter)
Submits the form by submitted using a specific submit button.
|
void |
reset()
Resets this form.
|
void |
setAction(String action)
Sets the value of the property
action . |
void |
setEncoding(String encoding)
Sets the value of the property
encoding . |
void |
setEnctype(String enctype)
Sets the value of the property
enctype . |
void |
setHtmlElement(HtmlElement htmlElement)
Sets the HTML element that corresponds to this JavaScript object.
|
void |
setMethod(String method)
Sets the value of the property
method . |
void |
setName(String name)
Sets the value of the property
name . |
void |
setTarget(String target)
Sets the value of the property
target . |
void |
submit()
Submits the form (at the end of the current script execution).
|
addBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, click, compareVersions, contains, doComponentRequest, focus, getAccessKey, getAlign, getAttributeNode, getAvailHeight, getAvailWidth, getBoundingClientRect, getBufferDepth, getCh, getChildren, getChOff, getClassList, getClassName_js, getColorDepth, getComponentVersion, getContentEditable, getCpuClass, getCurrentStyle, getDataset, getDir, getDomNodeOrDie, getDomNodeOrNull, getElementsByClassName, getForm, getHeight, getId, getInnerHTML, getInnerText, getLang, getLanguage, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnabort, getOnactivate, getOnanimationcancel, 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, getOndragleave, getOndragover, getOndragstart, getOndrop, getOndurationchange, getOnemptied, getOnended, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOngotpointercapture, getOnhelp, getOninput, getOninvalid, getOnkeydown, getOnkeypress, getOnkeyup, getOnload, getOnloadeddata, getOnloadedmetadata, 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, getOnselectionchange, getOnselectstart, getOnshow, getOnstalled, getOnsubmit, getOnsuspend, getOntimeupdate, getOntoggle, getOntransitioncancel, getOntransitionend, getOntransitionrun, getOntransitionstart, getOnvolumechange, getOnwaiting, getOnwheel, getOuterHTML, getParentElement, getParentHTMLElement, getPlatform, getPosX, getPosY, getPrefix, getRuntimeStyle, getStyle, getSystemLanguage, getTabIndex, getTitle, getUniqueID, getUserLanguage, getVAlign, getValue, getWidth, getWidthOrHeight, insertAdjacentElement, insertAdjacentHTML, insertAdjacentText, isAncestorOfEventTarget, isComponentInstalled, isCookieEnabled, isDisabled, isEndTagForbidden, isHidden, isHomePage, isIsContentEditable, isJavaEnabled, isLowerCaseInOuterHtml, isSpellcheck, mergeAttributes, navigateHomePage, readAttributes, releaseCapture, removeBehavior, removeNode, scrollIntoView, setAccessKey, setActive, setAlign, setAttribute, setCapture, setCh, setChOff, setClassName_js, setColorAttribute, setContentEditable, setDir, setDisabled, setDomNode, setHidden, setHomePage, setId, setInnerHTML, setInnerText, setLang, setLanguage, setOnabort, setOnactivate, setOnanimationcancel, 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, setOndragleave, setOndragover, setOndragstart, setOndrop, setOndurationchange, setOnemptied, setOnended, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOngotpointercapture, setOnhelp, setOninput, setOninvalid, setOnkeydown, setOnkeypress, setOnkeyup, setOnload, setOnloadeddata, setOnloadedmetadata, 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, setOnselectionchange, setOnselectstart, setOnshow, setOnstalled, setOnsubmit, setOnsuspend, setOntimeupdate, setOntoggle, setOntransitioncancel, setOntransitionend, setOntransitionrun, setOntransitionstart, setOnvolumechange, setOnwaiting, setOnwheel, setOuterHTML, setSpellcheck, setStyle, setTabIndex, setTextContent, setTitle, setVAlign, setValue, setWidthOrHeight, startDownload, toString
after, before, createAttributesObject, createEventHandler, createTextRange, get, getAttribute, 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, hasAttribute, hasAttributeNS, hasAttributes, innerHTML, isDisplayNone, matches, mozMatchesSelector, msMatchesSelector, printChildren, printNode, 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, webkitMatchesSelector
appendChild, asJavaScriptException, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, hasChildNodes, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, replaceChild, setNodeValue
addEventListener, clearEventListenersContainer, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandler
clone, equivalentValues, getBrowserVersion, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, has, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode
defineFunctionProperties, defineProperty, getClassName, put, setClassName, setParentScope
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, 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, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
public void setHtmlElement(HtmlElement htmlElement)
setHtmlElement
in class SimpleScriptable
htmlElement
- the HTML elementpublic String getName()
name
.getName
in class HTMLElement
public void setName(String name)
name
.setName
in class HTMLElement
name
- the new valuepublic HTMLCollection getElements()
elements
.public int getLength()
public String getAction()
action
.public void setAction(String action)
action
.action
- the new valuepublic String getMethod()
method
.public void setMethod(String method)
method
.method
- the new propertypublic String getTarget()
target
.public void setTarget(String target)
target
.target
- the new valuepublic String getEnctype()
enctype
.public void setEnctype(String enctype)
enctype
.enctype
- the new valuepublic String getEncoding()
encoding
.public void setEncoding(String encoding)
encoding
.encoding
- the new valuepublic HtmlForm getHtmlForm()
public void submit()
public void requestSubmit(Object submitter)
submitter
- The submit button whose attributes describe the method
by which the form is to be submitted. This may be either
an <input> or <button> element whose type attribute is submit.
If you omit the submitter parameter, the form element itself is used as the submitter.public Object item(Object index, Object subIndex)
index
- Integer or String that specifies the object or collection to retrieve.
If this parameter is an integer, it is the zero-based index of the object.
If this parameter is a string, all objects with matching name or id properties are retrieved,
and a collection is returned if more than one match is madesubIndex
- Optional. Integer that specifies the zero-based index of the object to retrieve
when a collection is returnedpublic void reset()
protected Object getWithPreemption(String name)
getWithPreemption
in class SimpleScriptable
name
- the property nameScriptable.NOT_FOUND
if not foundpublic Object get(int index, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
get
in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
get
in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
index
- the index of the propertystart
- the scriptable object that was originally queried for this propertypublic Object call(net.sourceforge.htmlunit.corejs.javascript.Context cx, net.sourceforge.htmlunit.corejs.javascript.Scriptable scope, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args)
call
in interface net.sourceforge.htmlunit.corejs.javascript.Callable
call
in interface net.sourceforge.htmlunit.corejs.javascript.Function
public net.sourceforge.htmlunit.corejs.javascript.Scriptable construct(net.sourceforge.htmlunit.corejs.javascript.Context cx, net.sourceforge.htmlunit.corejs.javascript.Scriptable scope, Object[] args)
construct
in interface net.sourceforge.htmlunit.corejs.javascript.Constructable
construct
in interface net.sourceforge.htmlunit.corejs.javascript.Function
public boolean dispatchEvent(Event event)
EventTarget
dispatchEvent
in class EventTarget
event
- the event to be dispatchedfalse
if at least one of the event handlers which handled the event
called preventDefault; true
otherwisepublic boolean checkValidity()
Copyright © 2002–2021 Gargoyle Software Inc.. All rights reserved.