THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

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