MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

WAP website construction (WAP website production) tutorial

Source: Shangpin China | Type: website encyclopedia | Date: June 14, 2012
WAP (wml) development tutorial
WAP (Wireless Application Protocol) is an open global standard for communication between digital mobile phones, the Internet or other personal digital assistants (PDAs), and computer applications. It is composed of a series of protocols, used to standardize wireless communication devices, and can be used for Internet access, including sending and receiving emails, accessing pages on WAP websites, and so on.
WAP closely links the mobile network with the Internet and the company's LAN. It provides a mobile value-added service independent of network type, operator and terminal equipment.
With this technology, wherever and whenever you need information, you can open your WAP phone and enjoy endless online information or resources. Such as: comprehensive news, weather forecast, stock market dynamics, business reports, current exchange rate, etc. E-commerce and online banking will also be realized one by one. You can also get the results of sports competitions, funny stories and humorous stories in the entertainment circle anytime and anywhere to add interest to your life. You can also use the online booking function to arrange your life in an orderly way.
WAP protocol includes the following layers:
1、Wireless Application Environment (WAE)
2、Wireless Session Layer (WSL)
3、Wireless Transaction Layer (WTP)
4、Wireless Transport Layer Security (WTLS)
5、Wireless Transport Layer (WDP)
Among them, the WAE layer contains micro browser, WML, WMLSCRIPT interpreter and other functions. WTLS layer provides basic security functions for wireless e-commerce and wireless encrypted data transmission.
The birth of WAP protocol is the result of years of efforts of WAP forum members. It defines a series of protocols for different protocol layers. These protocols enable all manufacturers and companies to work together to develop wireless communication network applications. At present, more than 100 members have joined the WAP forum, including manufacturers of terminals and infrastructure, network operators of mobile communications, service providers, software companies, network content providers, etc., to jointly develop services and applications for mobile devices.
However, due to the limitations of wireless network bandwidth and other factors, the application of WAP mobile phones in multimedia, such as visual conferencing, multimedia teaching, etc., will take some time.
The WAP specification is still improving, and the members of the WAP Forum are stepping up the development of WAP devices with complete functions, which undoubtedly speeds up its expansion in the field of wireless Internet integrated services.
The following points should be noted about WAP:
1. WAP not only brings mobile phones into IP/Internet networks
The WAP specification considers the characteristics of many wireless networks and mobile phones. Even 3G mobile phones can't make the screen look like a general-purpose computer to browse HTML pages. The 9110 can be directly connected to the IP network in 1998, but it is impossible to customize one application for Nokia, Motarola and Ericsson when they launch mobile phones.
Like WWW, before the introduction of the specification, there have been many applications based on IP networks, including some well done software. But the Internet bloomed everywhere after the introduction of WWW specifications. The great significance of WAP lies in its unified standards.
WAP and wireless IP networks are not contradictory. The WAP protocol stipulates that if the bearer is IP based, WDP is UDP. When the wireless IP network is popularized, if the upper layers are considered too cumbersome, the middle layers of the WAP protocol are omitted at most (there is not much in fact).
2. There are many WAP application modes
As long as mobile phones and networks support unified standards, business development is unlimited. I won't say much about that.
3. WAP is developing
The WAP specification not only defines the connection part with the Internet, but also defines the WTE and voice part. It can be said that the development is still early. If the communication core network is built in the future, voice services may be implemented by WAP.
WML Learning (I)
summary
WML (Wireless Markup Language) is a description language that belongs to the same family as the HTML language that we often hear about. The content written in HTML language can be read on our PC using IE or Netscape and other browsers, while the documents written in WML language are specially used to display on some wireless terminal screens such as mobile phones for people to read, and can also provide users with human-computer interaction interfaces and accept queries and other information input by users, Then the user is returned with the final information he wants.
Basic rules
*WML uses the XML document character set and currently supports Unicode 2.0. Unlike HDML, all WML tags, attributes and specified acceptable values must be lowercase, and CARD names and variables are case sensitive. As with HDML, only one space is displayed for consecutive empty characters. The value of the attribute in the tag must be enclosed with "or". There must be no space between the attribute name,=and the value. For the tag that does not appear in pairs, you must add/before ", such as" br/". The reference to variables is basically the same as HDML, including:
The following are the references:
$(var1:esc)
$(var1:noesc)
$(var1:unesc)
Three forms, see the relevant parts of HDML for specific meanings. The processing of reserved characters is basically the same, and the corresponding replacement characters are:
The following are the references:
《 《
》 》
’ '
” “
& &
$ $$
Space
- -
What we want to point out here is that in the process of URL transmission, the&used to connect parameters must be converted into&.
WML Learning (II)
Basic format and file header
General format of wml file:
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《head》
《access/》
《meta.。../》
《/head》
《card》
Some contents.。.
《/card》
《wml》
The structure looks very similar to the HTMl file. For each DECK, the following type declarations must be indicated at the beginning of the document:
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
Pay attention to the case of letters. For a DECK, the file size should not exceed 1.2K.
The "wml" tag, like the "html" tag in HTML, is used to indicate that it is a WML DECK. It has an optional xml: lang attribute to specify the language of the document. For example, "wml xml: lang=" zh "" indicates that the document language is Chinese.
Like HTML, the head tag contains information about the DESK. The "head" tag can contain one "access" tag and multiple "meta" tags.
Access domain="domain" path="/path"/is equivalent to the "BASE" tag in HTML, which specifies the access control information of the DECK. It uses two optional attributes. Domain is used to specify the domain, the default value is the current domain, and path is used to specify the path, the default value is "/", that is, the root directory It is used separately, so it should end with/. I will not repeat similar situations in the future.
Meta attribute content="value" scheme="format" forua="true | false"/is similar to HTML, which provides the meta information of the DECK. Attribute is mandatory, including the following three cases name="name" UP.Link Server ignores meta data
Http equiv="name" UP.Link Server converts meta data into HTTP response headers (the same as HTML)
User agent="agent" UP.Link Server directly transmits meta data to mobile devices. The content attribute is also required, and its content depends on the attribute. The scheme attribute is not supported at present. forua is an optional attribute, which specifies whether the meta tag is deleted by the intermediate agent before the wml file is transferred to the client (because the transmission protocol may change) , the default value is false.
Currently supported meta data:
Meta http equiv="Cache Control" content="max age=3600"/specifies the storage period of DECK in the mobile phone memory cache. The default is 30 days (unless the memory is exhausted). During this period, the mobile phone calls the visited DECK directly from the cache. If the information is time sensitive, you can use max age to specify the lifetime of the DECK in the cache. The minimum unit is seconds. If you specify 0, you need to call the DECK every time by connecting to the server.
Meta user agent="vnd. up. markable" content="false"/and the URL specified by meta user agent="vnd. up. bookmark" content="are similar to the bookmarking function of ordinary browsers. When a user bookmarks a CARD, the mobile browser first records the CARD with a tag, which defaults to the title attribute in the card tag (to be discussed later) , and then when the user selects the bookmark, the browser will open the recorded URL. However, by default, the phone will record all DECKs, so generally, Meta is used to prevent the phone from recording the current URL( Beijing website production ), that is, meta user agent="vnd. up. bookmark" content="false"/. In addition, if you want to specify a URL different from the current DRECK for the bookmark, use the URL "/" specified by meta user agent="vnd. up. bookmark" content=".
A DECK can contain multiple CARDs, and the content of each CARD may be displayed on more than one screen. Note the relationship between DECK, CARD and screen display range. A CARD is contained in Card and/card. Card can contain the following optional attributes:
《card id=”name“ title=”label“ newcontext=”false“ ordered=”true“ onenterforward=”url“ onenterbackward=”url“ ontimer=”url“》
*The id attribute is used to specify the name of CARD, which can be used to jump between CARDs. It is equivalent to using A NAME="jumpHere" when jumping within a page in HTML.
*The title attribute is used as the mark of the bookmark, and it is generally not displayed on the screen.
*The newcontext attribute, whose default value is false, is used to indicate whether the phone needs to clear the previously retained information, including variables, history in the stack, and reset the phone status when jumping to this CARD.
*The ordered attribute, whose default value is true, indicates whether the contents in the CARD are displayed in a fixed order or according to the user's choice. This is different from HTMl. The contents in the CARD page can be displayed in a certain order. By default, they are displayed in linear order, that is, in code order. However, it should be noted that the following three tags must be written in the following order: onevent, timer, and do (this is related to the "event" to be discussed later). This is for the convenience of filling in forms. When ordered is set to true, if the content of a form cannot be displayed in one screen, it will be displayed in multiple screens; When ordered is set to false, the phone can display a summary CARD to summarize effective options, from which the user can select form options to fill in.
*The onXXX attribute, similar to the onXXX attribute in the HTML tag, is used to capture events. When an event is triggered, it executes the specified operation (task). In this case, it turns to a URL.
WML Learning (III)
Show Text
WML is basically the same as HTML in text display. Text paragraphs are included between p align="alignment" mode="wrapmode" and/p. The align attribute specifies the alignment of the text. The default is left, and the other options are right and center; The mode attribute specifies whether or not to wrap when all text cannot be displayed in one line. The default is wrap. If no wrap is selected, it will be displayed in one line. The browser will display all text through a mechanism similar to a horizontal scroll bar.
The line break label is also "br/". Here, I will replace it first. If there are multiple "input" or "select" in the label list, do not use "br/" in the meantime, otherwise the mobile browser will view the form as a breakpoint and display the form in pages.
The word modification tags include b, i, u, em, strong, big and small, which have the same meaning as HTML.
The display label of a table is also similar to HTML. Table title="name" align="left | right | center" columns=", tr, and td are used to display the table. The title attribute of Table is used to name the table. The columns attribute specifies the number of columns in the table, and cannot be 0. The optional align attribute is the same as the above mentioned alignment. Tables can contain text and pictures.
test1.wml
--------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《card》
《p align=”center“》
《i》Hello《/i》《br/》
《b》《i》World! 《/i》《/b》
《table title=”mytable“ align=”right“ columns=”2“》
《tr》
《td》1-1《/td》
《td》1-2《/td》
《/tr》
《tr》
《td》2-1《/td》
《td》2-2《/td》
《/tr》
《/table》
《/p》
《/card》
《/wml》
display picture
The tag of the displayed image (1-bit black and white BMP image) is similar to HTML. img alt="text" src="url" localsrc="icon" align="left" height="n" width="n" vspace="n" hspace="n"/". The alt and src in the attribute are mandatory, and other options are optional. In addition, it should be noted that img should be placed in p, not in do and option And menu tabs.
*The alt attribute is used to specify the text to be displayed when the phone does not support picture display.
*The src attribute specifies the URL of the image, but when the following localsrc attributes are available, the mobile browser ignores the src attribute.
*The localsrc attribute is used to specify the icon displayed in the phone ROM. If it cannot be found, go to the UP Find it on the Link Server.
*The optional align attribute is used to indicate the alignment of the image with the text in the current line. The default value is bottom, and the options are to and middle.
*The height, width, vspace, and hspace attributes specify the length and width of the picture and the spacing from the surrounding text, respectively. Currently, not all WAP phones support these attributes.
test2.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org
/DTD/wml_1.1.xml“》
《wml》
《card》
《p align=”center“》《img alt=”:)“ src=”xxx.bmp“ localsrc=”smileyface“/》《/p》
《/card》
《/wml》
WML Learning (IV)
Anchors and Tasks
Connection is the most basic function in HTML pages. In WML, a href="url" title="label" and/a are also used to include the text used to establish the connection. The required attribute href specifies the URL to open, and the optional title attribute gives the connection a tag name, which will be used as the ACCEPT key of one of the soft buttons (see the previous HDML introductory article for details) The mark of is displayed in the soft button area of the screen, so you can usually use attributes as prompt text.
However, the above connection is just a task in WML. In order to use other tasks, a new label, Anchor title="label", task label text,/anchor, is introduced
Simple expression of go/.
test3.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org
/DTD/wml_1.1.xml“》
《wml》
《card》
《p》
《anchor title=”Link1“》《go href=”test1.wml“/》News《/anchor》《br/》
《a title=”Link2“ href=”test2.wml“》Sports《/a》
《/p》
《/card》
《/wml》
The following types of task tags are available in WML. They can be used not only in Anchor, but also in events:
1) Go is used to instruct the browser to display the specified URL, including the first CARD of DECK or the specified CARD. language
The method is as follows:
The following are the references:
《go href=”url“ sendreferer=”false|true“ method=”get|post“ accept-charset
=”charset“》
《postfield name=”name“ value=”value“/》
《setvar name=”name“ value=”value“/》
《/go》
The href attribute is required and the others are optional. The sendreferer attribute indicates whether to pass the URL of the page calling the URL specified by href, that is, the URL of the current page, that is, HTTP_REFERER in the HTTP header. The default value is false, and the optional value is true. Method is the same as the method attribute of the form form in HTML. It specifies whether the form should be submitted in the form of get or post for cgi processing. The default value is get. However, if the method is not specified but there is a "postfield" between "go" and "go", the mobile phone will automatically transfer it in the form of post. The accept charset attribute can cover the character set specified in the HTTP header. Multiple character sets can be written, such as accept charset="UTF-8, US-ASCII, ISO-8859-1".
Postfield name="name" value="value"/can be regarded as INPUT TYPE="HIDDEN" NAME="variable name" VALUE="value" in the HTML form FORM, through which data in the form of "variable name/value" can be passed to the specified URL. The name and value attributes are required. Note that only the variables here are used to submit to the CGI program.
In addition to Postfield, you can also add one or more sentences of setvar name="name" value="value"/between Go and/go, which means that when an event is triggered, a variable is assigned a value.
Note that when there is no statement between go and/go, go/should be used. This is particularly true, such as anchor title="Link1", go href="test. wml"/, News,/anchor.
2) Prev is used to push the URL of the current page into the URL history stack and open the previous URL. If the URL does not exist, Prev is invalid. The syntax is similar to Go: prev, setvar name="name" value="value"/, and/prev. One or more setvar name="name" value="value"/sentences can be added between prev and/prev. If not, it must be in the form of prev/.
3) Refresh is used to refresh the current page to refresh the variables in the page. The syntax is Refresh, setvar name="name" value="value"/, and/refresh.
4) "Noop" means doing nothing. This tag cannot be used in "anchor". It is generally used to overwrite the DECK level "do" (will be explained later).
WML Learning (V)
display form
Similar to HTML FORM, fieldset can be used to include a set of form options, but is not required. As mentioned earlier, when the card's ordered is set to false, the phone can display a summary CARD to summarize the effective options, which is convenient for users to select form options to fill in. The summary CARD is summarized according to the fieldset, the independent input box Input and the menu Select. The syntax is fieldset title="label" form content/fieldset. The optional title attribute can be used not only to indicate the name of the form, but also as the title of the selected item in the summary CARD. The form content can be a nested fieldset, an input box, a select and necessary prompt text.
Input name="variable" title="label" type="type" value="value" default="default" format="specifier" emptyok="false | true" size="n" maxlength="n" tabindex="n"/is used to enter text. Except that the name attribute is necessary, others are optional.
*The name attribute specifies the variable name used to store the input text.
*The title attribute, the name of the input box, can also be used as the option name in the summary CARD page.
*The default value of the type attribute is text. If password is selected, the entered data is displayed as *.
*The value attribute is syntactically and behaviorally equivalent to the following default attribute, the * default attribute, which specifies the default value of the input box, that is, the name attribute specifies the default value of the variable. When the user enters a new value, the value is invalid. If the value does not meet the requirements of the following format attribute, the default value will also be ignored by the computer.
*The format attribute is used to format the input data. The available tags are as follows. When used, it can be in the form of "one digit tag" and "* tag". The former represents N tag characters, such as 3X, and the latter represents any tag character (less than the value of the maxlength attribute).
Tag Description
A Any symbol or capital letter (excluding numbers)
A Any symbol or lowercase letter (excluding numbers)
N Any number (excluding symbols or letters)
X Any symbol, number or capital letter (cannot be changed to lower case letters)
X Any symbol, number or lowercase letter (cannot be changed to uppercase letter)
M Any symbol, number or uppercase letter (can be changed to lowercase letter) or multiple characters. The default is uppercase
M Any symbol, number or lowercase letter (can be changed to uppercase letter) or multiple characters, and the default is the first word in lowercase
*The maxlength attribute specifies the maximum character length that the user can enter. The maximum limit is 256 characters.
*The emptyok attribute indicates whether the user can leave the input box blank. The default value is false, that is, it needs to be filled in.
*The size attribute and the length displayed in the input box are not supported at present.
*The tabindex attribute is similar to which option the focus falls on after pressing the TAB key in an HTML form. This value determines the selection order, and the ones with large numbers are listed next. Not currently supported.
test4.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《card id=”card1“ ordered=”false“》
《p》
USERNAME:《input name=”userName“ title=”User Name“ type=”text“ value=”YourNameHere“ format=”*M“ emptyok=”false“ maxlength=”12“ tabindex=”1“/》
PASSWORD:《input name=”password“ title=”Password“ type=”password“ format=”8x“emptyok=”false“ maxlength=”8“ tabindex=”2“/》
COMMENTS:《input name=”comments“ title=”comment“ type=”text“ value=”YourCommentsHere“ format=”*M“ emptyok=”true“ maxlength=”30“ tabindex=”3“/》
《/p》
《/card》
《/wml》
Change the value of odered in Card to "true", and then add fieldset title="field1" and/fieldset in P and/p.
The Select menu is similar to the SELECT menu in an HTML form. The Select and/select can contain the optgroup and option tags. The syntax is as follows. All attributes are optional:
《select title=”label“ multiple=”false|true“ name=”variable“ default=”default“ iname=”index_var“ ivalue=”default“ tabindex=” n“》
Optgroup title="label" menu content/optgroup
《option title=”label“ value=”value“ onpick=”url“》
Event or text
《/option》
《/select》
*The title attribute, such as the title attribute in Input above.
*Multiple attribute, which specifies whether the user can make multiple selections. The default value is false.
*The name attribute is used to store the variable name of the user's choice. Its value is the value attribute of the option tag. If the user does not select and specify a default value with the default attribute, the phone assigns the change amount as an empty string "". For multiple selections, each value is separated by ";".
*The default attribute can assign a default value to the variable specified by the name attribute.
*The iname attribute is used to record the position of the user selected item. The corresponding value starts from 1. If it is not selected, the value is 0.
*The value attribute is used to record the location of the default value.
Optgroup can be used to group multiple options. optgroup and/optgroup can also include optgroup and option. This label is not supported yet.
Option, similar to the OPTION of a menu in HTML, is used to indicate the options of a menu. Event (see the next section) and menu display text can be included between Option and/option. The attribute of Option is optional. The value attribute is used to provide a value. After selecting this item, the value is assigned to the variable specified by the name attribute of Select. The onpick attribute is used to specify the URL of the page opened after the user selects the item and presses the ACCEPT key.
test5.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《card id=”card0“ ordered=”false“》
《p》
Please select a city.。.
《select title=”Cities List“ name=”city“》
《option title=”Beijing“ value=”c1“》Beijing《/option》
《option title=”Shanghai“ value=”c2“》Shanghai《/option》
《option title=”Hongkong“ value=”c3“》Hongkong《/option》
《/select》
Please select columns.。.
《select title=”Column List“ multiple=”true“ name=”col“》
《option title=”Hot News“ value=”l1“》News《/option》
《option title=”Cool Sports“ value=”l2“》Sports《/option》
《option title=”Pop Enter,,,“ value=”l3“》Entertainment《/option》
《/select》
《/p》
《/card》
《/wml》
WML Learning (6)
event
WML events are basically divided into two categories. One is keyboard (including soft and hard buttons) input events, which are handled with the Do tag, and the other is events inside related pages, which are handled with the One Event tag.
The syntax of "do" is as follows: "do type=" type "label=" label "name=" name "optional=" false | true "" The task "/do" refers to the four previously mentioned tasks. Among the attributes of "do", type is mandatory, and others are optional.
*The label attribute specifies the display text of the soft button on the screen. The current type attribute is invalid when it is delete, help, prev.
*The name attribute takes a name for "do". "do" in the same CARD cannot have the same name. If the CARD level do has the same name as the DECK level do, the DECK level do will be overwritten.
*The optional attribute specifies whether the phone can ignore this event. The default value is false.
*The type attribute specifies the triggered event, as follows:;
Trigger reason of type value
Accept calls the ACCEPT button mechanism
Delete calls DELETE button mechanism
Help calls HELP button mechanism
Options Call the selection button mechanism
Prev calls PREV button mechanism
Reset calls the RESET mechanism when clearing and resetting the phone status (currently not supported)
Unknown calls the unknown mechanism, which is equal to type="" (currently not supported)
vnd. Co type calls the vendor specific mechanism (currently not supported)
X - *, x - * for future use (not reserved) (not supported at present)
test6.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《head》
《meta http-equiv=”Cache-Control“ content=”max-age=0“/》
《/head》
《card id=”card0“ ordered=”false“》
《do type=”accept“ label=”InputName“ name=”do1“》
《go href=”#card01“/》
《/do》
《p》
NAME:《input name=”userName“ title=”User Name“ type=”text“ format=”*M“ emptyo
k=”false“ maxlength=”12“/》
《/p》
《/card》
《card id=”card01“》
《p》
You name is $(userName:noesc)。
《/p》
《/card》
《/wml》
The syntax of onevent is as follows. For onevent type="type" task/onevent, the value of the required attribute type is as follows:
The type value executes the task if the user performs the following operations
When the onpick user selects or does not select an option.
When the onenterforward user uses the go task to reach a CARD.
When the oneinterbackward user uses the prev task to return to the previous CARD, or press the BACK button.
Ontimer When the timer expires.
test7.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《head》
《meta http-equiv=”Cache-Control“ content=”max-age=0“/》
《/head》
《card id=”card0“ ordered=”false“》
《p》
Please select a city.。.
《select title=”Cities List“ name=”city“》
《option title=”Beijing“ value=”Beijing“》
《onevent type=”onpick“》
《go href=”#card01“/》
《/onevent》Beijing《/option》
《option title=”Shanghai“ value=”Shanghai“ onpick=”#card01“》Shanghai《/option》
《option title=”Hongkong“ value=”Hongkong“ onpick=”#card01“》Hongkong《/option》
《/select》
《/p》
《/card》
《card id=”card01“》
《p》
You are Living in $(city:noesc)
《/p》
《/card》
《/wml》
Timer/can be used to automatically execute a task after the user has not performed any operation for a period of time. Any task and user operation that activates the CARD page will start Timer/, and when the task is in progress, Timer/will stop.
Each CARD can only have one timer/, and one timer/can only trigger one task. The syntax is as follows: timer name="variable" value="value"/, where name is an optional attribute and is specified as a variable name. When you exit the CARD, this variable stores the value of the timer at this time. When the timer expires, the phone sets the variable to 0; value is a required attribute, which is used to set the timer's timing value. The minimum unit is 0.1 seconds.
test8.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《head》
《meta http-equiv=”Cache-Control“ content=”max-age=0“/》
《/head》
《card id=”card1“ ontimer=”#card2“》
《timer name=”time1“ value=”50“/》
《p align=”center“》
After 5s, goto card2
《/p》
《/card》
《card id=”card2“》
《onevent type=”ontimer“》
《go href=”#card1“/》
《/onevent》
《timer name=”time2“ value=”50“/》
《p align=”center“》
Here is card2!
《/p》
《/card》
《/wml》

Again, onevent, timer and do must be written in the above order.
In addition, Template can be added to the DECK level to bind events to the DECK level. The syntax is as follows:
《template onenterforward=”url“ onenterbackward=”url“ ontimer=”url“》
Do or onevent
《/template》
test9.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《head》
《meta http-equiv=”Cache-Control“ content=”max-age=0“/》
《/head》
《template》
《do type=”accept“ label=”deckPress“ name=”do1“》
《go href=”#card01“/》
《/do》
《/template》
《card id=”card0“ ordered=”false“》
《do type=”accept“ label=”cardPress“ name=”do1“》
《go href=”#card02“/》
《/do》
《p》
Press ACCEPT.。.
《/p》
《/card》
《card id=”card01“》
《p》
Here is card01
《/p》
《/card》
《card id=”card02“》
《p》
Here is card02
《/p》
《/card》
《/wml》
WML Learning (7)
CGI programming
1) Add the MIME type of WML on the WEB server
For IIS4, you can add new MIME type, suffix. wml and MIME type text/vnd.wap.wml to the site attribute in its manager.
For PWS, you can modify the registry, first add the primary key. wml in the HKEY_CLASSES_ROOT layer, then add the string value Content Type as text/vnd.wap.wml, and then add the primary key text/vnd.wap.wml in the HKEY_LOCAL_MACHINESoftwareCLASSESMIMEDatabaseContent Type, and then add the string value Extension as. wml.
HDML previously mentioned uses a similar method.
2) Access wml files in http mode
Enter in the URL column of the mobile browser //localhost/test.wml , you can access the WML file.
3) CGI design
The method is similar to that of ordinary CGI, except that when returning results, you must first output the Content Type as text/vnd.wap.wml, and then output the WML content.
test10.wml
---------------
The following are the references:
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《head》
《meta http-equiv=”Cache-Control“ content=”max-age=0“/》
《/head》
《card id=”card0“》
《do type=”accept“ label=”Input Name“ name=”do1“》
《go href=” //localhost/test.asp “ method=”post“》
《postfield name=”uid“ value=”123456“/》
《postfield name=”uname“ value=”$(userName:esc)“/》
《/go》
《/do》
《p》
NAME:《input name=”userName“ title=”User Name“ type=”text“ format=”*M“ emptyok=”false“ maxlength=”12“/》
《/p》
《/card》
test10.asp
---------------
《%
uid=Request. Form(”uid“)
userName=Request. Form(”uname“)
Response. ContentType=”text/vnd.wap.wml“
%》
《?xml version=”1.0“?》
《!DOCTYPE wml PUBLIC ”-//WAPFORUM//DTD WML 1.1//EN“ ” //www.wapforum.org/DTD/wml_1.1.xml “》
《wml》
《card》
《p》
USERNAME:《%=userName%》
USER__ID:《%=uid%》
《/p》
《/card》
《/wml》
WAP website server configuration
Set APACHE WEB SERVER
Whether it is NT, UNIX or LINUX, you need to modify the conf/time.types file in the Apache installation directory and add the following content to the file:
text/vnd.wap.wml .wml
image/vnd.wap.wbmp .wbmp
application/vnd.wap.wmlc .wmlc
text/vnd.wap.wmls .wmls
application/vnd.wap.wmlsc .wmlsc
save
Restart APACHE WEB SERVER.
Setting WAP SERVER in IIS based on WINDOW NT platform
With the following simple settings, NT IIS can become a WAP server. You can write WML web pages or develop various services.
Setting method: (first make sure that the NT Server has IIS installed)
Execute Start/Program/Windows NT Option Pack/IIS 4.0/I under NT operating system
Internet service administrator.
In the IIS service administrator window, click the name of the host computer, press the right mouse button, and click the "Properties" option;
There is a file type button at the lower back of the attribute window. Click this button to open the file type interface;
Click the 'New Type' button, and fill in. wml in the relevant extension column, and text/vnd.wap.wml in the content type (MIME) column
Click the 'OK' button
Repeat the above steps to add the following WML types to MIME:
Related extension content type (MIME)
.wml  text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls  text/vnd.wap.wmlscript
.wmlsc  application/vnd.wap.wmlscriptc
.wbmp  image/vnd.wap.wbmp
This article was published by Beijing Website Construction Company Shangpin China //ihucc.com/
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]