第三章 WML编程 |
|---|
| WAP技术站:www.wapease.com
|
onenterforward事件需要包含在card元素、template元素或onevent元素的标签中进行定义,其语法格式为: <card id="name" title="label" newcontext="boolean" ordered="true" onenterforward="href" onenterbackward="href" ontimer="href"> 内容(content) </card> 或: <template onenterforward="href" onterbackward="href" ontimer="href"> 内容(content) </template> 或: <onevent type="onenterforward"> <go href="href"/>其他任务(task) </onevent> 前两种格式中,onenterforward事件作为card元素或template元素标签中的一个属性进行定义的,该属性即为onenterforward,它制定了一个超链(href)的URL地址,当用户进入当前卡片时,浏览器就据此打开URL指定的卡片。这种格式制定的任务相当与go任务。 3.3.4 onenterbackward事件 当用户使用prev任务或类似的任务来导航至某一卡片时,onenterbackward事件才可发生。换句话说,当用户从历史堆栈中选取URL地址,并通过浏览器打开这一地址对应的卡片时,onenterbackward事件才可能发生。 与onenterforward事件类似,onenterbackward事件也需要包含在card元素、template元素或onevent元素的标签中进行定义。其具体语法格式如下: <card id="name" title="label" newcontext="boolean" ordered="true" onenterforward="href" onenterbackward="href" ontimer="href"> 内容(content) </card> 或: <template onenterforward="href" onterbackward="href" ontimer="href"> 内容(content) </template> 或: <onevent type="onterbackward"> <go href="href"/>其他任务(task) </onevent> 前两种格式中,onterbackward事件是作为card元素或template元素标签中的一个属性进行定义的,该属性即为onterbackward,它指定了一个超链(href)的URL地址,当用户使用prev等任务项回到地址时,浏览器就会打开URL指定的卡片。 |
| 上一篇:第二章 WML语言基础 下一篇:第四章 WML Script语法基础 |
