option (JavaScript 1.0)

Option in a Select list.

Properties & Events

KeyDescriptionAvailability
defaultselectedWhether or not the option is selected by default.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
indexIndex in the options array for the option.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
selectedWhether or not the option is currently selected.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
textText for the option.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0
valueValue of the option that is sent when the form is submitted.
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 7.0

Result from the Online TryIt-Editor
chrome 1.0safari 1.0Firefox 1.0ie 4.0opera 5.0

Examples having uses of: 'option'

4 votes
11k views

HTML5 Datalist

Think of a combination of an input text element and selection list. Typically used where there is the likelihood of a visitor entering a value of other (not one of the items in the list).
2 votes
1k views

HTML Select

This HTML element defines a selection list within a form.
1 votes
2k views

Html Input Form

Example form using <legend> and <fieldset> to make the form layout fancy.
1 votes
2k views

jQuery Focus & Change Event

jQuery events can be used to register behaviors to take effect when the user interacts with the browser, and to further manipulate those registered behaviors.
0 votes
2k views

jQuery - Multiple CSS properties

jQuery allows to change the multiple CSS properties value at once.