Tutorial
Tasks and navigation-jump and pass parameters
Go's basic attributes and applications
One of the basic ways to achieve a jump between card is that the combination of Go,go and do, anchor and so on is a foundation of the advanced application of WML.
Related properties:
HREF: The URL that declares the link
Sendreferer: Indicates whether to pass the URL of the page that invokes the URL specified by href, which is the URL of the current page, that is, the Http_referer in the HTTP header, the default value is False, and the optional value is True
The Method:wml method is similar to the HTTP submission form, with the same post and get two, with the default parameter of got.
Post is different from Get: Post is encoded before sending, then sent in groups, the sending process is relatively safe, suitable for large data processing, and get method does not do any processing, one-time issue, suitable for small amount of data exchange. Unless you are sure that the data you submitted can be submitted at once, use the Post method as much as possible.
Accept-charset: Defines the type of character set to send and receive information between the browser and the server, for example: accept-charset= "Utf-8,us-ascii,iso-8859-1".
Example:
<?xml version= "1.0"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en" "http://www.wapforum.com/DTD/wml_1.1.xml" >
<wml>
<card id= "Start" >
<do type= "Accept" label= "Next" >
<go href= "#nextCard"/>
</do>
<p>this is the card!</p>
</card>
<card id= "NextCard" >
<do type= "prev" label= "before" >
<prev/>
</do>
<p>this is the last card!</p>
</card>
</wml>
Go combination Postfield Exchange parameters
Tag go can contain one or more Postfield tags that carry parameters to the server for data exchange.
Example 1: Generate a "quote.pl?stock=00001" GET request
<go href= "/cgi-bin/quote.pl" >
<postfield name= "Stock" value= "00001"/>
</go>
Example 2: Generate a "stockname= securities &page=1" POST request
<go href= "/cgi-bin/query.pl" method= "POST" >
<postfield name= "StockName" value= "Securities"/>
<postfield name= "page" value= "1"/>
</go>