- WML Tutorial
- WML - Home
- WML - Overview
- WML - Environment
- WML - Syntax
- WML - Elements
- WML - Comments
- WML - Variables
- WML - Formatting
- WML - Fonts
- WML - Images
- WML - Tables
- WML - Links
- WML - Tasks
- WML - Inputs
- WML - Submit Data
- WML - Server Scripts
- WML - Events
- WML - Timer
- WML - Template
- WML - DTD
- WML2 - Tutorial
- WML References
- WML - Entities
- WML - Tags Reference
- WML Tools
- WAP - Emulators
- WML - Validator
- WML Useful Resources
- WML - Quick Guide
- WML - Useful Resources
- WML - Discussion
WML <option> Tag
The <option>...</option> tags are used to define an item in a selection list. Items are presented as radio buttons in some WAP browsers. The <option>...</option> tag pair should be enclosed within the <select>...</select> tags.
Attributes:
This element supports the following attributes:
Attribute | Value | Description |
---|---|---|
onpick | url | Sets what is going to happen when an user selects an item |
title | text | Sets a title for the option |
value | text | Sets the default value of the variable in the "name" attribute |
xml:lang | language_code | Sets the language used in the element |
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
Example:
Following is the example showing usage of this element.
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="Selectable List"> <p> Select a Tutorial : <select> <option value="htm">HTML Tutorial</option> <option value="xml">XML Tutorial</option> <option value="wap">WAP Tutorial</option> </select> </p> </card> </wml>
When you will load this program, it will show you the following screen:
Once you highlight and enter on the options, it will display the following screen:
Advertisements
To Continue Learning Please Login
Login with Google