WML初级教程之关于WML的事件

| |
[2005/09/29 17:14 | 分类: Html技术 | by gdgzboy ]
[此文来源于互联网,牛C网只负责收集整理]

  内部事件(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>

        

            


作者:gdgzboy@牛C网
地址:http://www.niuc.net/post/3385/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!



评论(0) | 引用(0) | 阅读(117)
发表评论
昵称 [注册]
密码 游客无需密码
网址
电邮
打开HTML 打开UBB 打开表情 隐藏 记住我