Wml-ontimer-tag

提供:Dev Guides
移動先:案内検索
<onevent type="ontimer">
   A task to be performed.
</onevent>
<timer value="50"/>

例:

以下は、<onevent>要素とともに ontimer イベントの使用方法を示す例です。

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">

<wml>

<card id="splash" title="splash">
  <onevent type="ontimer">
    <go href="#welcome"/>
  </onevent>
  <timer value="50"/>
<p>
  <a href="#welcome">Enter</a>
</p>
</card>

<card id="welcome" title="Welcome">
<p>
Welcome to the main screen.
</p>
</card>
</wml>

このプログラムをロードすると、次の画面が表示されます。

WAP Exampple19

特定の Enter オプションを選択しない場合、5秒後に Welcome ページに移動し、次の画面が自動的に表示されます。

WAP Exampple20