Click to return to the DHTML, HTML     
value Property     VALUE Attribute | value P...     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

VALUE Attribute | value Property


Sets or retrieves the value of the object.

Syntax

HTML<ELEMENT VALUE = sValue ... >
Scriptingobject.value [ = sValue ]

Possible Values

sValueString that specifies the value of an object or a FORM control. The purpose of the string depends on the type of control, as follows:
checkboxThe selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value.
fileThe value, a file name, typed by the user into the control. Unlike other controls, this value is read-only.
hiddenThe control submits this value when the form is submitted.
OPTIONThe selected value. The containing list box control submits this value only if the user has selected the option.
passwordThe default value. The control displays this value when it is first created and when the user clicks the reset button.
radioThe button label. If not set, the label defaults to "Reset".
resetThe selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value.
submitThe button label. If not set, the label defaults to "Submit Query."
textThe default value. The control displays this value when it is first created and when the user clicks the reset button.

This property is read/write with a default value of on for the checkbox and radio objects, Submit Query for the submit object, and Reset for the reset object. All other objects have no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see Dynamic Properties.

Remarks

The VALUE attribute of the PARAM object specifies a value passed to an APPLET, EMBED, or OBJECT object.

Example

This example sets the value for each option to an integer string (for example, a part number).

Sample Code

<SELECT>
<OPTION VALUE="123">Item One
<OPTION VALUE="456">Item Two
<OPTION VALUE="789">Item Three
</SELECT>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
BUTTON, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, OPTION, PARAM


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.