defaultSelected
Summary
Gets or sets the value of the selected HTML attribute.
Property of dom/HTMLOptionElementdom/HTMLOptionElement
Syntax
var initiallySelected = option.defaultSelected;
option.defaultSelected = value;
Return Value
Returns an object of type BooleanBoolean
Whether the selected HTML attribute is present.
Notes
The property can be changed programmatically, but doing so has no effect on the appearance of the option or the submitted value - if the selected property has been changed by a user or by a script. The property does change the appearance of the selected option if the form is reset.
Related specifications
- DOM Level 1
- Recommendation
See also
Related pages
- selectedselected
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]