JavaScript Kit > JavaScript Reference > Here
Submit Object
Last updated: June 20th, 2004
The submit button (<input type="submit">) within your form can be accessed and manipulated using JavaScript, via the corresponding Submit object. To access the button in JavaScript, use the syntax:
document.myform.submitbtnname
document.myform.elements[i] //where i is the position of the submit button
within form
Related Tutorials
Events
Events | Description |
---|---|
onClick | Code is executed when the user clicks on the submit button. By returning false in this event, you may cancel the form submission. eg: <input type="submit" onClick="return false"> |
Properties
Properties | Description |
---|---|
disabled | Boolean value that sets/ returns whether the submit button is disabled. |
form | References the form that contains the submit button. |
name | Reflects the name of the submit button (the name attribute). |
type | A property available on all form elements, "type" returns the type of the calling form element, in this case, "submit". |
value | A read only string that specifies the value of the submit button. |
Reference List
- JavaScript Operators
- JavaScript Statements
- Global functions
- JavaScript Events
- Escape Sequences
- Reserved Words
Right column