HyperlinksWML also supports an <a> element for hyperlinks. Like the HTML version of this element, you use the href attribute to specify the URI you want to navigate to. Here's an example that takes the user to the Apache WML example: Listing ch20_13.wml<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 2.0//EN" "http://www.wapforum.org/dtd/wml20.dtd" > <wml> <card id="Card1" title="Hyperlinks"> <p align="center"><b>Hyperlinks</b></p> <p> Want to see some WML examples? Take a look at the <a href="http://www.apachesoftware.com/wml/wmldemo.wml"> Apache examples </a>. </p> </card> </card> </wml> You can see the results of this WML in Figure 20-12. When the user clicks the hyperlink, Klondike will navigate to the target URI. Figure 20-12. A WML hyperlink.
|