X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Input Submit value Property

Input Submit Object Reference Input Submit Object

Example

Change the text displayed on a Submit button:

document.getElementById("mySubmit").value = "newSubmitButtonValue";

Try it yourself »


Definition and Usage

The value property sets or returns the value of the value attribute of the submit button.

The value attribute defines the text that is displayed on the submit button.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The value property is supported in all major browsers.


Syntax

Return the value property:

submitObject.value

Set the value property:

submitObject.value=text

Property Values

Value Description
text The text displayed on the submit button

Technical Details

Return Value: A String, representing the text displayed on the submit button


More Examples

Example

Return the text displayed on a Submit button:

var x = document.getElementById("mySubmit").value;

The result of x will be:

Submit form

Try it yourself »


Input Submit Object Reference Input Submit Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook