Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Attribute for <OPTION ...>
SELECTED

SELECTED indicates that the option should be selected by default. For example, in this example, the third item ("widget analyzer") is the default item:

this code produces this select list
<SELECT NAME="partnumber">
<OPTION VALUE="7382"          >steam turbine
<OPTION VALUE="2928"          >resistor array
<OPTION VALUE="3993" SELECTED >widget analyzer
<OPTION VALUE="9398"          >fiber identifier
</SELECT>

SELECTED can also be used in multiple select lists. In this example, the "green team" and the "purple team" are the default selected items:

this code produces this select list
<SELECT NAME="teams" MULTIPLE SIZE=6>
<OPTION VALUE="b"          >blue team
<OPTION VALUE="g" SELECTED >green team
<OPTION VALUE="r"          >red team
<OPTION VALUE="p" SELECTED >purple team
<OPTION VALUE="f"          >fuschia team
<OPTION VALUE="m"          >mango team
</SELECT>

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire