WML Tutorial 4: Jump and pass parameters

Source: Internet
Author: User
Tags character set prev
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>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.