Name
submit — NN 2 IE 3 DOM 1
Synopsis
The submit
object
is a form control generated with an INPUT
element
whose TYPE
attribute is set to
"submit"
. This object is similar to the
button
object, but a submit
object has more implied power. No script action is necessary for the
submit
object to do its job of submitting the
containing form to the server. If you require a button to perform a
script action, but not an actual form submission, use the
button
object instead. Otherwise, the
submit
object automatically reloads the current
document, perhaps destroying important script variables. To initiate
form validation, use the onSubmit
event handler of
the form object rather than the onClick
event
handler of the submit button. If the event handler evaluates to
true
, the form is submitted; if it evaluates to
false
, the submission is cancelled.
HTML Equivalent
<INPUT TYPE="submit">
Object Model Reference
- NN
[window.]document.
formName
.
elementName
[window.]document.forms[i].elements[i]
- IE
[window.]document.
formName
.
elementName
[window.]document.forms[i].elements[i]
[window.]document.all.
elementID
Properties
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Methods
|
|
|
|
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.