📅  最后修改于: 2020-10-28 05:41:53             🧑  作者: Mango
WML提供各种选项,使用户可以通过WAP应用程序输入信息。
首先,我们将研究允许用户在项目之间进行直接选择的不同选项。这些通常以菜单和子菜单的形式出现,从而允许用户向下钻取所需的确切数据。
该元素支持以下属性:
Attribute | Value | Description |
---|---|---|
iname | text | Names the variable that is set with the index result of the selection |
ivalue | text | Sets the pre-selected option element |
multiple |
|
Sets whether multiple items can be selected. Default is “false” |
name | text | Names the variable that is set with the result of the selection |
tabindex | number | Sets the tabbing position for the select element |
title | text | Sets a title for the list |
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. |
以下示例显示了这两个元素的用法。
Select a Tutorial :
当您加载该程序时,它将显示以下屏幕:
突出显示并输入选项后,它将显示以下屏幕:
您要提供选择多个选项的选项,然后将多个属性设置为true ,如下所示:
Select a Tutorial :
这将为您提供一个选择多个选项的屏幕,如下所示:
元素用于创建输入字段,输入字段用于从用户获取字母数字数据。
该元素支持以下属性:
Attribute | Value | Description |
---|---|---|
name | text | The name of the variable that is set with the result of the user’s input |
maxlength | number | Sets the maximum number of characters the user can enter in the field |
emptyok |
|
Sets whether the user can leave the input field blank or not. Default is “false” |
format | A a N X x M m *f nf |
Sets the data format for the input field. Default is “*M”.
A = uppercase alphabetic or punctuation characters |
size | number | Sets the width of the input field |
tabindex | number | Sets the tabbing position for the select element |
title | text | Sets a title for the list |
type |
|
Indicates the type of the input field. The default value is “text”. Password field is used to take password for authentication purpose. |
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. |
以下是显示此元素用法的示例。
Enter Following Information:
Name:
Age :
Sex :
这将为您提供以下屏幕,以输入所需的信息: