public class HTMLFormElement extends HTMLElement implements net.sourceforge.htmlunit.corejs.javascript.Function
Form
.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) |
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 JavaScript attribute
action . |
HTMLCollection |
getElements()
Returns the value of the JavaScript attribute
elements . |
String |
getEncoding()
Returns the value of the JavaScript attribute
encoding . |
String |
getEnctype()
Returns the value of the JavaScript attribute
enctype . |
int |
getLength()
Returns the value of the JavaScript attribute
length . |
String |
getMethod()
Returns the value of the JavaScript attribute
method . |
String |
getName()
Returns the value of the JavaScript attribute
name . |
Object |
getOnsubmit()
Returns the
onsubmit event handler for this element. |
String |
getTarget()
Returns the value of the JavaScript attribute
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 |
reset()
Resets this form.
|
void |
setAction(String action)
Sets the value of the JavaScript attribute
action . |
void |
setEncoding(String encoding)
Sets the value of the JavaScript attribute
encoding . |
void |
setEnctype(String enctype)
Sets the value of the JavaScript attribute
enctype . |
void |
setHtmlElement(HtmlElement htmlElement)
Sets the HTML element that corresponds to this JavaScript object.
|
void |
setMethod(String method)
Sets the value of the JavaScript attribute
method . |
void |
setName(String name)
Sets the value of the JavaScript attribute
name . |
void |
setOnsubmit(Object onsubmit)
Sets the
onsubmit event handler for this element. |
void |
setTarget(String target)
Sets the value of the JavaScript attribute
target . |
void |
submit()
Submits the form (at the end of the current script execution).
|
addBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, click, compareVersions, createTextRange, doComponentRequest, doScroll, fixAttributeName, focus, get, getAccessKey, getAlign, getAll, 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, getDisabled, getDocument, getDomNodeOrDie, getDomNodeOrNull, getElementsByClassName, getFilters, getHeight, getId, getInnerHTML, getInnerText, getIsContentEditable, getJavaEnabled, getLang, getLanguage, getLocalName, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnchange, 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, isEndTagForbidden, isHomePage, isLowerCaseInOuterHtml, mergeAttributes, navigateHomePage, parseHtmlSnippet, querySelector, querySelectorAll, readAttributes, releaseCapture, removeAttributeNode, removeBehavior, removeExpression, removeNode, scrollIntoView, setAccessKey, setActive, setAlign, setAttribute, setCapture, setCh, setChOff, setClassName_js, setColorAttribute, setContentEditable, setDir, setDisabled, setDomNode, setExpression, setHomePage, setId, setInnerHTML, setInnerText, setInnerTextImpl, setLang, setLanguage, setOnchange, setOuterHTML, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTagUrn, setTextContent, setTitle, setVAlign, setWidthOrHeight, startDownload, toString
createAttributesObject, createEventHandler, getAttribute, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, getTagName, hasAttributeNS, removeAttribute, removeAttributeNS, selectNodes, selectSingleNode, setAttributeNode, setAttributeNS, setDefaults
fireEvent, 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, setOnresize
appendChild, asJavaScriptException, attachEvent, cloneNode, compareDocumentPosition, contains, detachEvent, getBaseName, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getNamespaceURI, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, getXml, hasChildNodes, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, replaceChild, setNodeValue
addEventListener, clearEventListenersContainer, executeEventLocally, fireEvent, getEventHandler, getEventHandlerProp, getEventListenersContainer, hasEventHandlers, removeEventListener, setEventHandler, setEventHandlerProp
clone, equivalentValues, getBrowserVersion, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode
defineFunctionProperties, defineProperty, getClassName, setClassName, setParentScope
applyDescriptorToAttributeBitset, 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, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, size
public void setHtmlElement(HtmlElement htmlElement)
setHtmlElement
in class SimpleScriptable
htmlElement
- the HTML elementpublic String getName()
name
.public void setName(String name)
name
.name
- the new valuepublic HTMLCollection getElements()
elements
.public int getLength()
length
.
Does not count input type=image
elements
(MSDN doc)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 valuepublic String getTarget()
target
.public Object getOnsubmit()
onsubmit
event handler for this element.getOnsubmit
in class HTMLElement
onsubmit
event handler for this elementpublic void setOnsubmit(Object onsubmit)
onsubmit
event handler for this element.setOnsubmit
in class HTMLElement
onsubmit
- the onsubmit
event handler for this elementpublic 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 void submit()
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.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
otherwiseCopyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.