Check if the selected option is checked by default:
The defaultSelected property returns the default value of the selected attribute.
This property returns true if an option is selected by default, otherwise it returns false.
Note: If an option is selected by default, it is displayed first in the drop-down list.
The defaultSelected property is supported in all major browsers.
Return Value: | A Boolean, returns true if the option is selected by default, otherwise it returns false |
---|