YouTip LogoYouTip

Prop Pushbutton Value

# Button value property [![Image 8: Button ObjectsReference Manual](#) Button Objects](#) * * * ## Definition and Usage value propertyCan set or return the value property on the button. value propertySpecify the text displayed on the button. **Important:** If you use the button element in an HTML form, different browsers will display different values. Internet Explorer displays the value in the tag, while other elements display the value on the value property. In an HTML form, you can use the input element to display a button. ## Syntax buttonObject.value=_value_ * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) All major browsers support the value property. * * * ## Instance ## Instance Returns the text displayed on the button:

button text: document.write(document.getElementById("button1").value);

[Try it Β»](#) * * Button Objects](#)
← Prop Form AcceptcharsetXml Applications β†’