Latest web development tutorials

HTML DOM Submit value property

Submit Object Reference Submit objects

Definition and Usage

value property sets the property value or return value submit button. .

value specified on the confirmation button text display.

grammar

Set the value property:

submitObject.value="value"

Returns the value property:

submitObject.value


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support attribute value


Examples

Examples

The following example prompts the text displayed on the confirmation button:

<html>
<head>
<script>
function displayResult()
{
var x=document.getElementById("submit1").value;
alert(x);
}
</script>
</head>
<body>

<form>
Email: <input type="text" id="email">
<input type="submit" id="submit1" value="Submit form">
</form>

<button type="button" onclick="displayResult()">Display value</button>

</body>
</html>

try it"


Submit Object Reference Submit objects