Select Object
By: aathishankaran Printer Friendly Format
The select object is one of the most useful and flexible of all the form objects. You can use it in- instances where you might otherwise use a- radio object. The select object can take up less real estate than a radio object, which needs space for each of its radio buttons. The basic HTML syntax for a select object follows:
SYNTAX
<SELECT
[NAME="objectName"] [SIZE="numberVisible"] [MULTIPLE]
[onBlur="methodName"][onChange="methodName"][onFocus="methodName"]>
<OPTION
VALUE="optionValue" [SELECTED]>displayText</OPTION>
[<OPTION VALUE="optionValue">displayText</OPTION>]
</SELECT>
Example
<Html>
<Head>
<Title>
Select
Object Example
</Title>
<Body>
<Hl>Example
for Select Object</Hl>
<H2>Select
any item</H2>
<Hr>
<Form
Name=form1>
<Center>
C
0 LOU R S
<Br>
<Select
Name=sl Size=l onChange="tl.value=sl.value">
<Option
Value=Red>Red
<Option
Value=Blue>Blue
<Option
Value=Green>Green
<Option
Value=Yellow>Yellow
<Option
Value=White>White
<Option
Value=Pink>Pink
</Select>
<Br>
<Br>
<Input
Type=Text Name=tl Size=20>
<Hr>
</Center>
</Form>
</Body>
</Html>
Output
Comment on this tutorial
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview