Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves the default or selected value of the control .
Syntax
< ELEMENT VALUE = sValue ... > |
object.value [ = sValue ] |
Possible Values
sValue | String that specifies or receives the value for the control. |
The property is read/write. The property has no default value for all objects with the following exceptions:
INPUT type=checkbox | on |
INPUT type=reset | Reset |
INPUT type=submit | Submit Query |
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties .
Remarks
The purpose of the value property depends on the type of control as described in the following table.
input type=checkbox | The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value. |
input type=file | The value, a file name, typed by the user into the control. Unlike other controls, this value is read-only. |
input type=hidden | The value that the control submits when the form is submitted. |
option | The selected value. The containing list box control submits this value only if the user has selected the option. |
input type=password | The default value. The control displays this value when it is first created and when the user clicks the reset button. |
input type=radio | The selected value. The control submits this value only if the user has selected the control. Otherwise, the control submits no value. |
input type=reset | The button label. If not set, the label defaults to Reset. |
input type=submit | The button label. If not set, the label defaults to Submit. |
input type=text | The default value. The control displays this value when it is first created and when the user clicks the reset button. |
Standards Information
This property is defined in HTML 4.0 and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
|
BUTTON , INPUT , INPUT type=checkbox , INPUT type=hidden , INPUT type=button , INPUT type=radio , INPUT type=reset , INPUT type=submit |
Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |