Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves whether the option in the list box is the default item.
Syntax
<OPTION SELECTED ... > |
OPTION.selected [ = bSelected ] |
Possible Values
bSelected | Boolean that specifies or receives one of the following values.
|
The property is read/write. The property has a default value of false .
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
If the property is not set, the first item is selected by default.
The property determines whether a value is submitted with the form. If the value of the control matches the default value, the control's value is not submitted. The value is submitted only when the control's value does not match the default value.
To select an item in HTML, it is not necessary to set the value of the SELECTED attribute to true . The mere presence of the SELECTED attribute set its value to true .
Standards Information
This property is defined in HTML 3.2 and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To
|
OPTION |
Home | Top | Website design | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |