Input Submit value Property
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
Property | |||||
---|---|---|---|---|---|
value | Yes | Yes | Yes | Yes | Yes |
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;
Try it Yourself »
❮ Input Submit Object