Input Submit value Property

❮ Input Submit Object

Example

Change the text displayed on a Submit button:

document.getElementById("mySubmit").value = "newSubmitButtonValue";
Try it Yourself »

Description

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
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.