打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
WML教程7:WML的事件
WML教程7:WML的事件

内部事件(onevent)

相关属性:

type:内部事件的触发条件,当前浏览器状态满足触发条件时,浏览器就会触发这个条件下设置的task,内部事件总共有4种触发条件。

  1 ontimer 满足时钟设置的条件时,该条件成立。关于时钟设置问题,后面还有专门的说明。
  2 onenterbackward 通过prev或其他外部命令返回到当前card,该条件成立。
  3 onenterforward 当浏览器通过链接进入当前card,该条件成立
  4 onpick 在使用option控件列表的时候,任何点击控件的行为都会触发本事件,包括选择和去掉选择。

示例:

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

<!-- this deck can‘t use in ericsson r320sc ,because r320sc haven‘t accept button-->

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

<card id="two">
<do type="accept" label="next">
  <go href="#three"/>
</do>
<onevent type="onenterbackward">
  <go href="#temp"/>
</onevent>
<p>this is the second card.</p>
</card>

<card id="three">
<do type="accept" label="back">
  <prev/>
</do>
<p>this is the thired card.</p>
</card>

<card id="temp">
<do type="accept" label="start">
  <go href="#first"/>
</do>
<p>haha, you are lost!</p>
</wml>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
判断是否是通过手机访问
用ThinkPHP3.2.2框架做手机和PC端浏览器的切换
post,get,put等请求方法有什么不同
关于WML
在Apache上简简单单开个WAP站点 - ESGD.com
WML开发详细指南
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服