August 1999
Intermediate to advanced
1488 pages
72h 53m
English
option.defaultSelected
The defaultSelected property of the Option object specifies the initial option selection of the select list.
Listing 7.409 shows an example of how the defaultSelected property is used. The check function checks for the default selected option.
<html> <head> <title> Example of the defaultSelected property of the option object</title> </head> <body> <script language="JavaScript"> <!--Hide // function checks the form to see what is the default selected. function check(myForm){ for (var i = 0; i < document.form1.myList.length; i++) { if (document.form1.myList.options[i].defaultSelected ... |
Read now
Unlock full access