input (type="submit") | Firefox/Netscape/NN 2 IE 3 Chrome/Safari/DOM 1 |
| |
The submit object is a form control generated with
an input element that has a
type attribute 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 or button-type
input object instead. Otherwise, the
submit object automatically reloads the current
document (i.e., obeying the form's default action,
which is the page's URL), 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. The scripted equivalent of a submit-type
input object is the form
object's submit( ) method.
|
|
HTML Equivalent |
|
<input type="submit">
|
|
Object Model Reference |
|
[window.]document.formName.elementName
[window.]document.forms[i].elements[i]
[window.]document.getElementById("elementID")
|
|
Object-Specific Properties |
|
|
|
Object-Specific Methods |
|
|
|
Object-Specific Event Handler Properties |
|
Handler | Firefox/Netscape/NN | IE | Chrome/Safari/DOM | onblur | 6 | 4 | 2 |
onclick | 3 | 4 | 2 |
onfocus | 6 | 4 | 2 |
onmousedown | 4 | 4 | 2 |
onmousemove | 6 | 4 | 2 |
onmouseout | 6 | 4 | 2 |
onmouseover | 6 | 4 | 2 |
onmouseup | 4 | 4 | 2 |
|