6.3.2 ontimer事件、onenterforward事件、onenterbackward事件 |
|---|
| WAP技术站:www.wapease.com
|
6.3.2 ontimer事件 ontimer事件只能包含在card元素或template元素的标签中进行定义,其语法形式为:
<card id="name" title="label" newcontext="boolean" ordered="true" onenterforward="href" onenterbackward="href" ontimer="href" > 内容(content) </card> 或: <template onenterforward="href" onenterbackward="href" ontimer="href" > 内容(content) </template>
ontimer事件只有一个属性,即ontimer。它用于指定一个超链(href)的URL地址,当指定时间timer过期的时候,用户浏览器就会按照该超链(href)的URL打开相应的卡片。 下面给出的例子就包含有ontimer事件,指定当浏览器等待5秒钟后,显示http://wapserver/hello.wml:
<card id="cardname" ontimer="http://wapserver/hello.wml" title="title"> <timer value="50"/> <p> Hello World! </p> </card>
6.3.3 onenterforward事件 |
| 上一篇:6.3 事件及其元素 下一篇:6.3.5 onpick事件、onevent元素、postfield元素 |
|
