WML <anchor> 標籤



        <anchor>...</anchor> 標籤對用於建立錨鏈接。它與其他稱為 <go/>、<refresh> 或 <prev/> 的 WML 元素一起使用。這些元素稱為任務元素,並告訴 WAP 瀏覽器在使用者選擇錨鏈接時該做什麼。

        您可以在 <anchor>...</anchor> 標籤對內包含文字或影像以及任務標籤。

        屬性

        此元素支援以下屬性

        屬性描述
        titlecdata定義一個識別連結的文字
        xml:langlanguage_code設定元素中使用的語言
        classclass data為元素設定一個類名。
        id元素 ID元素的唯一 ID。

        示例

        以下是顯示此元素用法的示例。

        <?xml version="1.0"?>
        <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
        "http://www.wapforum.org/DTD/wml12.dtd">
        
        <wml>
        
        <card title="Anchor Element">
        <p>
           <anchor>
              <go href="nextpage.wml"/>
           </anchor>
        </p>
        <p>
           <anchor>
              <prev/>
           </anchor>
        </p>
        </card>
        
        </wml>
        

        這將產生以下結果

        WAP Example 9
        廣告

© . All rights reserved.