当前位置: 首页 > 网络学院 > XML相关教程 > WAP > <timer>

WAP
WAP 介绍
WAP 基础知识
WML 格式化
WML 链接
WML Input
WML 任务
WML 计时器
WML 变量
WML 实例
Validate WML
WML 参考
WML 字符实体
WML DTD

WAP 中的 <timer>


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 190 ::
收藏到网摘: n/a

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 RuanChen!" for 3 seconds, and then take you to the file "test.wml":

在下面的案例中,“Hello RuanChen!”将显示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 RuanChen!</p>
</card>
</wml>

评论 (0) All

登陆 | 还没注册?