Properties


VALUE Attribute | value Property

Sets or retrieves the default or selected value of the control.

Syntax

HTML<ELEMENT VALUE = sValue... >
Scripting[ sValue = ] object.value

Possible Values

sValueString that specifies or receives the value for the control.

The property is read/write. The property has no default value.

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are not supported in IE8 mode. For more information, see About Dynamic Properties.

Standards Information

This property is defined in HTML 4.0 World Wide Web link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 World Wide Web link.

Applies To

BUTTON, HTMLButtonElement Constructor, HTMLInputElement Constructor

See Also

button
Tags :


Community Content

Michael Wolf - MSFT
Value attribute in &lt;button&gt; tag

The problem with the <button> tag is not yet fixed.

Ideally if I code <button type = "submit" value="inner value">Outer value</button>

On click the value that should be passed on to the next page is "inner vale".

This happens in case of firefox correctly but for IE it passes "Outer value" which is present in between the tag.

This working is incorrect, since the "inner value" should be passed and not doing this makes the 'Value' attribute redundant for IE

since it doesnot serve its purpose.

Please fix this

[jsudds.MSFT] This behavior is fixed in Internet Explorer 8 Beta 1 in "compliance" (IE8) mode.


Page view tracker