Latest web development tutorials

HTML DOM Reset value property

Reset Object Reference Reset objects

Definition and Usage

value property sets or returns the value of the property value reset button.

value attribute specifies the text displayed on the reset button.

grammar

Set the value property:

resetObject.value="value"

Returns the value property:

resetObject.value


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support attribute value


Examples

Examples

The following example prompts the display of text on the reset button:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
var x = document.getElementById ( "reset1") value.;
alert (x);
}
</ Script>
</ Head>
<Body>

<Form>
Email: <input type = "text" id = "email">
<Input type = "reset" id = "reset1" value = "Reset form">
</ Form>
<Button type = "button" onclick = "displayResult ()"> to display the value of the reset button </ button>

</ Body>
</ Html>

try it"


Reset Object Reference Reset objects