Submit Object
CSGNetwork FREE Source Code, Javascript Source, and Code Snippets!
CSGNetwork Custom Search
     Bookmark and Share
Top Free Apps

Right click this window and select "view source" in order to copy the source for this script.

Submit Object

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.elements[i] //where i is the position of the submit button within form


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 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.

Bookmark and Share
Registered® Trademark™ and Copyright© 1973 - CSG, Computer Support Group, Inc. and CSGNetwork.Com All Rights Reserved