August 1999
Intermediate to advanced
1488 pages
72h 53m
English
select.type
The type property of an instance of a Select object returns the type of the select box. This is either select-multiple, if the multiple attribute is set in the <select> tag, or select-one if it is not.
Listing 7.478 has a select box and a button. When the button is clicked, an alert box is popped up that displays the type property of the select box.
<html> <head> <script language="JavaScript1.1"> <!-- Hide // Display an alert box that contains the type of the // select box. function getType(){ alert("The name of this text box is " + document.myForm.elements[0].type); } // End ... |
Read now
Unlock full access