Input Submit value Attribute
Definition and Usage
value
Sets or returns the value of the submit button's value attribute.
The HTML value attribute defines the text displayed on the submit button.
Instance
Example 1
Change the text displayed on the submit button:
document.getElementById("mySubmit").value = "新的提交按钮值";
Example 2
Returns the text displayed on the submit button:
var x = document.getElementById("mySubmit").value;
Syntax
Return value attribute:
submitObject.value
Set value attribute:
submitObject.value = text
Attribute Value
Value | Description |
---|---|
text | Text displayed on the submit button. |
Technical Details
Return Value: | A string value that represents the text displayed on the submit button. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |