网络学院 w3pop社区 网络资源 IT新闻

w3pop.com :: 网络学院 :: WAP :: WML < timer >标签

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

WML < timer >标签


作者:w3pop.com 翻译/整理:w3pop.com 发布:2007-04-29 浏览:712 :: ::

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>标签一起使用。

Syntax
语法

<timer value="somevalue"/>

Attributes
属性

属性 描述
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
为元素设置一个独立的名称

Examples
案例

The example below will display "Hello W3POP!" for 3 seconds, and then take you to the file "test.wml":

在下面的案例中,“Hello W3POP!”将显示3秒钟,然后,它将自动转到“test.wml”文件:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card ontimer="test.wml">
<timer value="30"/>
<p>Hello W3POP!</p>
</card>
</wml>

评论 (0) All