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