当前位置: 首页 > 网络学院 > XML相关教程 > WAP > <timer>
The <timer> tag defines a card timer. The timer starts when the card is entered, and stops when you exit the card.
<timer>标签定义了一个卡片计时器。当进入该卡片时,计时器开始计数;当离开该卡片时,计时器停止计数。
Note: It is not allowed with more than one timer element per card.
注意:每张卡片中不允许出现多个timer[计时器]元素。
Note: The time unit of the timer is 1/10 of a second.
注意:timer[计时器]的时间单位是1/10秒。
Note: This tag can be used with <card>, <onevent>, and <template> tags.
注意:这个标签通常与<card>、<onevent>和<template>标签一起使用。
<timer value="somevalue"/> |
属性 | 值 | 描述 |
---|---|---|
value | cdata | REQUIRED. Sets the default value of the variable defined in the "name" attribute 必要参数。设置在“name”属性中定义的变量的默认值 |
name | nmtoken | Names the variable that is set with the value of the timer 为timer[计时器]值的变量名命名 |
class | cdata | Sets a class name for the element. The class name is case sensitive. An element can be connected to multiple classes. Multiple class names within the class attribute are separated by white space 为元素设置一个类名称。类名称是字母大小写不敏感的。一个元素可以被连接到多个类中。类属性中的多个类名称是通过空白符进行分隔的 |
id | id | Sets a unique name for the element 为元素设置一个独立的名称 |
The example below will display "Hello RuanChen!" for 3 seconds, and then take you to the file "test.wml": 在下面的案例中,“Hello RuanChen!”将显示3秒钟,然后,它将自动转到“test.wml”文件: <?xml version="1.0"?> <wml> |