本页内容是《WML教程4:跳转和传递参数》同时我们还提供济宁地区的网站建设,百度,雅虎,google的推广,点金,商友,等营销软件
请输入关键字:

标题搜索 内容搜索  

你现在所在的位置->首页->wap->WML教程4:跳转和传递参数

WML教程4:跳转和传递参数

时间:[2005-11-24 14:27:13]     作者:未知

WML教程4:跳转和传递参数

go的基本属性和应用

实现card之间跳转的一个基本方法是go,go和do、anchor等标签的结合是wml高级应用的一个基础。

  相关属性:

  href:声明链接的url

  sendreferer:表示是否传递调用href所指定的url的页面的url,也就是当前页的url,即http头中的http_referer,默认值为false,可选值为true

  method:wml的method与http提交表单的方法类似,同样有post和get两种,缺省参数为get。

  post与get的不同:post在发送前要进行编码处理,然后分组发送,发送过程相对安全,适合大数据量的处理;而get方法不进行任何处理,一次性发出,适合小数据量交换。除非你肯定你提交的数据可以一次性提交,否则请尽量用post方法。

  accept-charset:定义浏览器与服务器之间收发信息的字符集类型,例如:accept-charset="utf-8,us-ascii,iso-8859-1"。

示例:

<?xml version="1.0"?>
<!doctype wml public "-//wapforum//dtd wml 1.1//en" "http://www.wapforum.com/dtd/wml_1.1.xml">
<wml>

<card id="start">
  <do type="accept" label="next">
    <go href="#nextcard"/>
  </do>
<p>this is the first card!</p>
</card>

<card id="nextcard">
  <do type="prev" label="before">
    <prev/>
  </do>
<p>this is the last card!</p>
</card>
</wml>

go结合postfield交换参数

标签go可以包含一个或多个postfield标签,用这些标签携带参数与服务器进行数据交换。

示例1:产生一个"quote.pl?stock=00001"get申请

<go href="/cgi-bin/quote.pl">
  <postfield name="stock" value="00001"/>
</go>

示例2:产生一个"stockname=证券&page=1"post申请

<go href="/cgi-bin/query.pl" method="post">
  <postfield name="stockname" value="证券"/>
  <postfield name="page" value="1"/>
</go>

【声明】本站刊载的《WML教程4:跳转和传递参数》一文如果有侵害你权益的情况,请联系我们。我们将及时采取措施。
QQ:44637339 Email:just6@163.com Tel:13355163107 Lining studios

友情链接

本页内容是《WML教程4:跳转和传递参数》 返回顶部
© 2001-2024 Lining studios 济宁速创科技有限公司, All Rights Reserved
 Processed Time:46.875ms
中华人民共和国信息产业部网站备案号: 鲁ICP备09103015号-1