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

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

WAP 中的 <anchor>


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

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

登陆 | 还没注册?