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

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

会员登陆

帐号

密码

回答

记住密码

忘记密码? 注册

WML < anchor >标签


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

The <anchor> tag defines an anchor (a link), which allows you to jump from one card/deck to another. The <anchor> tag always has a task ("go", "prev", or "refresh") specified. The task defines what to do when the user selects the link.
<anchor>标签是用来定义一个“锚”(a link)的,它可以使你直接跳到某个页面中指定的位置。<anhor>标签中总是要包含一个指令(“go[前进]”、“prev[前进]”、“refresh[刷新]”)。它是用于定义“锚”所指向的位置。

Note: Whenever it is possible, use the <a> tag instead of the <anchor> tag.
注意:尽可能使用<a>标签,而不是<anchor>标签。

Note: It is not allowed to nest anchors.
注意:“锚”不允许嵌套使用。

Syntax
语法

<anchor>
..text..
..image..
..task..
</anchor>

Attributes
属性

属性 描述
title cdata Defines a text identifying the link
定义“锚”链接地址的文本标题
xml:lang language_code Sets the language used in the element
设置元素中所使用的语言
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
案例

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
<card title="Anchor Tag">
<p>
 <anchor>Next page
  <go href="test.wml"/>
 </anchor>
</p>
</card>
</wml>

评论 (0) All