WML tutorial 8: WML document structure Xiang solution

xiaoxiao2021-03-06  44

WML tutorial 8: WML document structure Xiang solution

WML document structure Xiang solution 1, declaration

2, element (Element) WML first defines a DECK, then encapsulate information and card in DECK.

3, the head element header information contains information related to DECK, including META data and control elements.

3.1, Access Permissions (Access)

This element is used to set a list of access to the current DECK permission. If the DECK does not contain Access Element information, the Access Element under this deck is in an invalid state, and all other decks can access the Deck.

Related properties:

Domain: If you set then http://www.sina.com will have access rights, and http://www.sino.com.cn/ and http : //www.sina.net.cn/ There is no.

PATH: Working principle is very similar to Domain, such as setting

Example:

Do the following set

Then the following URLs have access rights:

Http://www.sina.com.cn/wap/goto.ci http://www.sina.com.cn/wap/index.wml http://www.sina.com.cn/wap/cgi- BIN / CREATE_REPORT.CGI? Name = 123 & PWD = 234

Several URLs are not accessible:

http://www.sina.com/wap/getuid.cgi http://www.sina.com.cn/internal/wap/getuid.cgi

3.2, head element setting (META)

and HTML is similar, providing META information of the deck.

For example:

The Content property is a must, and its content is determined according to attribute. The scheme attribute is currently not supported. Forua is optional attribute, the tag is deleted by the intermediate agent before the WML file is transmitted to the client (because the protocol of the transmission may change), the default value is false.

Currently supported META data:

Specifies the storage time period in the phone memory cache, the default for 30 days (unless the memory is exhausted), during which The phone is called directly from the cache for the visited DECK. If the information is sensitive to time, you can specify the survival period in the cache with the max-agn, the minimum unit is second, if specified as 0, then each time you need to call the DECK. and Demonstration bookmarks for ordinary browsers Features. When the user makes a bookmark, the mobile browser first records the CARD with a tag, this tag default is the title attribute in the tab (will be said in the future), and then when the user selects the bookmark, The browser will open the recorded URL. But because of the default, the phone will record all decks, so general is used to make the phone do not record the current URL, that is, . In addition, if you want to specify a URL that is different from the current DRECK for bookmarks, use the URL "/> specified by < WML>