当前位置: 首页 > 网络学院 > XML相关教程 > WAP > WML 链接

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

WAP 中的 WML 链接


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

Links
链接

A WML card can be set up to display the anchor functions of WML.
WML的card可被设置来显示WML的anchor函数

<anchor>
锚记

The <anchor> tag always has a task ("go", "prev", or "refresh") specified. The task defines what to do when the user selects the link. In this example, when the user selects the "Next page" link, the task says "go to the file test.wml":
<anchor>标记总是带有指定的任务("go"向后, "prev"向前, 或 "refresh"刷新)。任务定义了当用户选择链接时该做些什么。在这个例子里,当用户选择"Next page"(下页)链接时,任务是“到文件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 title="Anchor Tag">
<p>
<anchor>Next page
<go href="test.wml"/>
</anchor>
</p>
</card>
</wml>

<a>

The <a> tag always performs a "go" task, with no variables. The example below does the same as the <anchor> tag example:
<a>标记经常执行一个"go"任务,但没有变量。下面的例子和<anchor>标记例子所做的一样:

<?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="A Tag">
<p>
<a href="test.wml">Next page</a>

</p>
</card>
</wml>

 


Image
图像

A WML card can be set up to display an image:
WMLcard可被设置显示图像:

<?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="Image">
<p>
This is an image
<img src="/images/stickman.wbmp" alt="stickman" />

in a paragraph
</p>
</card>
</wml>

The result MIGHT look like this in your mobile phone display:
手机显示的结果也许是这样的:

------ Image ------

This is an image stickman  in a paragraph

Note that .wbmp is the only image type that can be displayed in a WAP browser.
注意:.wbmp类型是能在WAP浏览器中被显示的唯一一种图像类型。

评论 (0) All

登陆 | 还没注册?