Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Button value attribute

Input Button value attribute

Button Object Reference Button Object


Definition and Usage

The value attribute sets or returns the value of the value attribute of the button element.

The value attribute specifies the text displayed on the button.

Syntax

Set the value attribute:

buttonObject.value="

value

"

Return the value attribute:

buttonObject.value


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the value property.


Example

Example

Display the text of the button:

Runoob Tutorial(runoob.com)

Try it »


Button Object Reference Button Object