The elements of WML usually have a first label, content, other elements, and a tail label. That is, a separate label is an element, and a pair of labels that appear to the content also constitute an element. Due to elements involved and labels, the label also involves attributes. 1 card, card set and its property 1.1 A common attribute of a common attribute WML element mainly 3: ID, Class, and XML: LANG attributes. All Elements of WML have two core properties, namely, (ID), and class (Class) properties. They are mainly used for information transmission of server side. Where the ID property is used to define unique indications in the card group, that is, its name; the Class property is used to define one or more classes (Class) to the current element. Like the card set, class (Class) is also named, and multiple elements can use a class name. All elements in a single card group with the same name can be seen as part of the same class. Class names are case sensitive. If you have multiple unique class names in the class property list, this element can be regarded as part of these classes. A plurality of class names with the same attribute must be intervals with two spaces, and the WML program will be ignored when excess class names and their properties are ignored. In addition, in the WML program, all elements containing text have the "XML: LANG" attribute. This attribute is used to specify the description language used in the current element and its properties, such as British English, US English, French, German, etc., and can provide a basis for the user's browser to select the language of the text. 3.1.2 File header of the WML program typical WML program file header includes the following two lines mentioned in front of us: XML Version = "1.0"?> where" - // WAPFORUN // DTD WML 1.1 // en "is a standard universal tag language SGML Name; "http://www.wapforum.org/dtd/wml_1.1.xml" is the label of the WML program document type. The document type indicator can also be "text / vnd.wap.wml" or "Application / VND.WAP.WMLC", where the former develops the original type of WML, which makes the WML program to compile the code type. 3.1.3 WML Elements WML WML Elements are used to define a card group and contain all cards and information in the card group via and WML> tags. Its syntax format is as follows: Content "Content (content) included in the content included in the content, including Head, Template, and Card elements. Where HEAD, the template element can only be included once, while the Card element must contain at least once. Usage of these elements We will later. 3.1.4 Template Elements The Template element is used to define a template for all the cards in the current card group, and some parameters of the card. Event processing functions in the template can automatically apply these parameters to all cards in the same card group. However, we can also be in the form of a template specified in one or a few cards, and the method is to define an event in the card to replace the corresponding event in the template.
The template function is implemented by the "Content), and its syntax format is implemented by and template> tag. In the contents of the content element, the content element contains, in addition to the general parameters of the card, can also contain any multi-DO elements and onevent elements. The functionality and usage of the Template element properties are as follows: 1) OnsetForward. When the user enters the current card in the browser, this property specifies the HREF URL address, and the browser will open the URL specified card or event. 2) OnsetBackward. Similar to the previous property, the attribute can also specify the URL address of its corresponding card or event. If the user is executed, the browser is positioned to the URL address specified by the hyperlink (HREF) specified by this property, and opens the URL specified card or event. 3) ONTIMER. When the specified time Timer expires, the user browser opens the corresponding card according to the URL specified by the ONTIMER property. 3.1.5 Card Element WML Card Set is composed of one or more cards (Card), each card contains a set of user and browser interaction configuration and mode. The user is diverse to the needs of interactive operations, so it must also be diverse when the card is defined. To this end, WML provides a CARD element, defines various properties of a card via and Card> tab, including content. Its grammar format is as follows: content (content) In addition to text, image information, in addition to text, image information, in addition to text, image information, in addition to text, image information. Among them, the Timer element can only be used once, and the remaining three can be used multiple times. Moreover, if the CARD element contains onevent elements or Timer elements, the onevent element must be placed at the forefront, and the TIMER element is placed behind the onevent element, and then the DO or P element can be used. This priority order is unrest. The functions and usage of the CARD element properties are as follows: 1) ID. Used to specify the name of the Card. The change name is the basis for the program navigation positioning, which can be used as a block anchor point, such as . The cardName is called the card name specified by the ID. 2) Title. Used to develop a simple title or explanatory information for the card. 3) NewContext. Used to specify whether the WAP mobile phone browsing is required to initialize all the contents in the card when the user reinches.
It has two options for True and false. When newContext = "TURE" is specified, all the contents of the card will initialize when the user re-enters, nor does it clear the history record; otherwise, specify newContext = "false", will not be performed Initialization settings, no history records. The setting value in the default state is false. In addition, NewContext can only be executed when it is part of the GO task. 4) Ordered. Used to indicate the organization's form of card content to your mobile phone's browser to allow your browser to schedule the layout in a timely manner based on its own characteristics and card content organization. It has two Booleans worth setting, namely true and false. When Ordered = "True", the browser will display the contents of each area in linear sequence. This linear order is usually the information browsing sequence used to most users. For example, when sending E-mail information, we need E-mail first-person address, topics, and E-mail content, this logical order. When Ordered = "Flase", the browser will display the content according to the order selection or specified by the user. This is mainly used to display a simple data record such as a user option, disorderly, or user input. 5) OneterForward. OneterForward event can only occur when the user uses the Go task or similar to the Go's task bit and the browsing card, that is, if the user performs the GO task, the browser will locate the URL specified in the tag. Card. The OneNterForward property in the CARD element is a simple format of the Onevent element that directly specifies the URL address of the OneNterForward event. 6) Oneterbackward. This property can specify the URL address of its response time. If the user performs the prev task while browsing, the browser is positioned to the URL address of the hyperlink (HREF) set, and opens the URL specified. Oneterbackward attribute is also a simple format of the Onevent element. 7) ONTIMER. When the specified time Timer expires, the user browser opens the corresponding card according to the URL specified by the ONTIMER property. It also belongs to a simple format of the Onevent element. 3.1.7 Access element Access elements are elements implemented by a separate label tag. Used to define the operation authority of the WML across the entire card group, that is, the access control parameters. Access elements must be declared in the HEAD element and other META information, and each card set can only have an Access element. The grammar format is as follows: ... head> Access element properties The functions and usage are as follows: 1) Domain. Used to specify the URL domain that operates on the card set, the default domain is the domain where the current card group is located. Domain's purpose is to restrict access. When users browse, the browser will derive the value that matches the value according to the value specified by the Domain value and accesses the card or event corresponding to the address. 2) Path. The root directory of other card groups for specifying the card group operation. The default directory is "/", that is, the root directory where the current card group is located. The default directory regulations make all the card groups under the Domain domain can operate the current card group. The value of PATH is the path that needs to match when access, and its working principle is very similar to Domain, which needs to match each subpath of the path, otherwise it is invalid. 3.1.8 Meta element META elements are used to define general META information related to the WML card set.
This element is an element implemented by a separate label, the tag, its syntax format is as follows: where the Name property and http-equiv attribute can only choose one; the Content property is required, its value is determined according to attribute; the scheme property is not yet supported; the Forua property is optional attribute. Each attribute function and usage are described below: 1) Content. This attribute is used to specify the value of the nature of META information, it is not necessary. 2) Name. The name for specifying the nature of META information. User browser is usually ignored that Meta data has been named, and the network service enterprise refuses to send content that contains the META data name specified in this property. 3) HTTP-Equiv. This property is used to replace the NAME attribute to convert META data to the response header of the WSP or HTTP protocol. 4) forua. This property is used to specify the nature of those developers wish to transmit value user browsers. It has two values of Ture and Fales. If false is taken, the card group must use the intermediate agent to remove META element information before sending to the client, because the protocol of the transmission may change; if the value is TRUE, META data Must be sent to the user's browser. In the default, the value of this property is false. 5) Scheme. This property is used to specify the form or structure of explaining the Nature value of META information. Specific forms or structures differ depending on the type of META data. 3.2 Tasks and Its Elements WML allow us to specify some tasks in the program, and these tasks can be performed when some specific events are activated, thereby completing the required operations. For example, we can set a task that when the user presses the corresponding function key, the browser can open the specified card group or card. Currently, WML provides four task elements, namely GO, Prev, NOOP, and Refresh, which are primarily in response to events specified in the DoEvent element. In this section, we will make a detailed introduction to these elements of the task. 3.2.1 GO Task GO Task is declared through the GO element, and the GO element is defined by the and tags. The GO element is mainly used to define the URL address that needs navigation of the browser. If the address is a WML card or card group name, the browser opens and displays the corresponding card, card group; otherwise, the browser will execute the URL specified task or event. In the historical pumping stack, the GO task executes a "push" operation, that is, the URL address of the browser browsing is sent to the history record list when it executes it. The Go element can contain any setvar elements or postfield elements. The postfield element has been introduced, and it is no longer able to rear report, and the setvar element will be introduced later. The syntax format of the GO task is as follows: content (content)> content and usage The introduction is as follows: 1) href. This property is used to specify the target URL address, such as the address of the card displayed by the browser. Attributes are required, other properties are optional. 2) Sendreferer.
This attribute is used to specify whether the URL of the URL specified by the HREF is transmitted, and the URL of the current page, that is, http_referer in the HTTP header. There are two options: True or False. Where default is false. 3) Method. Like the form of forms form in HTML, this property is used to specify that the form is submitted in a GET or POST manner to submit to the universal gateway interface CGI processing. The default value is GET, but if the Method property is not specified, the PostField element is present between and , the WAP mobile browser will automatically pass in a Post mode. 4) accept-charset. When the web server processes input information from the browser, the property can specify the character set list that must be employed when the server performs data encoding. That is, the character set specified by this property replaces the character set specified in the HTTP header to select the criteria for the serverator. 3.2.2 prev task The prev task is implemented by the prev element. This element is usually a separate label , but sometimes it can be defined by and prev> one pair of tags. It is used to specify the front URL address to navigate to the browser to the historical pum. In the historical push stack of the browser operation, the Prev task executes the "Remove" operation, remove the previous URL address, and advance the current URL address into the historical push. If there is no previous URL address in the historical push stack, that is, the prev / element does not perform any tasks. The syntax format of the Prev task is: or content (content) prev> In the latter language method, the content containing the prev element is generally a setvar element, and the meaning of the element has been introduced. The specific usage will then be described here. 3.2.3 Refresh task Refresh task is declared by the refresh element, which is used to refresh the current card and update the variable specified in the card. Its syntax format is: content (Context) refresh> contains content in content, which is usually setvar elements, its syntax format is , it can Specifies the updated variable name Name, that is, the updated variable value value. In addition, the refresh element may also not include a setvar element. The card is refreshed by time limit (Timer element). 3.2.4 NOOP Task NOOP Tasks The NOOP element is declared, indicating what is not done, is an air operation, which is very useful in replacing the DO element in alternative card sets. This element is a separate label, that is, the tag. Its syntax format is as follows: no attribute, the following simple program contains the NOOP element implementation to be spaced: DO> ... card> 3.3 Time and its element WML provide several elements that dedicate navigation and events for user browsers. Use these elements users can give a task to develop an associated event. Then when the event is triggered, the browser will perform the corresponding task, such as the URL navigation is implemented by an event. Moreover, the event can be bundled with a task that needs to be completed.
Event bundles are generally achieved by several elements and their label declarations such as GO, Do and Onevent. Below we explain the event elements and events of WML. 3.3.1 DO element DO elements provide a universal event processing mechanism such that users can participate in event processing of current cards. Contact the user interaction with a certain task through the and DO> tags. User interaction can be the function key pressed by the user, the selected menu item, or the user's voice prompt. When the user activates these interaction, the user browser performs tasks related to the DO element. Its syntax format is as follows: Task (task) do> where Tast is associated with the DO element, is also conditional activation The browser is about to execute. In the DO element, the user must bind and only one task in the task in the four elements of GO, Prev, NOOP, and Refresh. The GO element is used to locate the URL address, the prev element is used to locate and open the previous operation or task, and doop is empty operation, refresh is used to refresh the current card set or task, and the detailed usage of them will be introduced later. The DO element can be used for card levels and can also be used for card group level. When used for card level, the DO element must be included in the CARD element; for the card group level, the DO element must be included in the template element, and the defined DO element will be applied to all current card sets. card. At this point, if a card does not want the DO element in the template and its tasks, you need to use the methods described earlier, using the same name event processing to replace the event processing of the DO element in the template. Moreover, regardless of whether the task associated is the same, when the event name defined by the DO element is the same, the DO element of the card will ignore the influence of the card group level DO element, and the DO element of the card will be prioritized. In addition, the DO element containing the empty operation task, whether it is activated, it does not transmit or display it into the user's browser, which can speed up the productivity of the browser to a certain extent because the server end body is abandoned. The judgment of some empty tasks. The functions and usage of each attribute of DO elements are as follows: 1) TYPE. The type (TYPE) used to specify the DO element, that is, the user interaction of the user needs to be associated, and it is a must attribute. When the user browser receives these events, they activate them and perform the appropriate operations and processing. If multiple DO elements are defined in one card and have the same TYPE, the user must specify a different event name for each Dok, otherwise it will happen the error. The typical type (TYPE) and execution conditions of the DO element are as follows: 1, accept. The browser receives or activates the current selection when the user selects or presses the corresponding function keys (Accept), options, naming, or buttons. 2, prev. When the Prev key is activated, the browser will navigate to the previous card in the history. 3, Help. Activate the Help function key or the corresponding button, when naming, the browser displays help information related to the current content. 4, reset. Activate the RESET function key or the corresponding button, name, clear, or reset the status of the current card group or browser. 5, Options. Activate the Options function key or the corresponding button, when naming, the browser displays the options or additional operations related to the current content. 6, delete. Activate the DELETE function button or the corresponding button, name it, delete the current project or selection. 7, unknown.
If the given type cannot be identified for the DO element, it will be in accordance with UNKNOWN type, which is equivalent to type empty, namely Type = "". 8, vnd. *. VND. * and other different cases [VV] [NN] [DD]. *. This type is defined by VND.COTYPE, is used to activate a particular feature of the supplier or user browser to customize, where CO is an abbreviation for the company. 9, X- * and X- *. Extended type, currently not used in WML. 2) Label. The text string specified by this property can represent the user's interaction event. For example, after a task is binding on the Accept key, the Label property is set, such as label = "gone", then the browser will display the value of the Label on the screen; if you do not specify, browse The default "OK" string will appear. To ensure that the property value of Label does not exceed 6 characters in the smaller phone. However, this may be slightly different from the WAP mobile phone brand, the model is different, and some mobile phones cannot exceed 5 characters. Moreover, if the mobile browser does not support dynamic tag display, it will ignore the Label property. 3) This property is used to specify the name of the event binding the DO element. If multiple DO elements have set the same name, then the events they bind them are all. If the card generally develops the same event name with the DO element at the card group, the card level time will be prioritized, and the event of the card group will be ignored. WML stipulates that two or more DO elements having the same event name (Name) may not be specified in the same card or in the same template. In addition, if the NAME attribute value is empty, it is equivalent to not specifying the NAME attribute, and the event or operation executed by the DO element is determined by the attribute value of TYPE. 4) Optional. Specifies whether the browser ignores the DO element and its tasks. There are two optional values: True and False. If the value is True, the browser will ignore the current DO element, that is, the task it is not being executed. Conversely, if the value is false, the DO element is executed. 3.3.2 Ontimer Event ONTIMER is used to specify an event. When the tag specifies the time expired, the browser executes the event specified by ONTIMER. Ontimer's time can be a URL address, a card set, a WML web page, an image or other file that meets the URL positioning. The time specified by the tag is a positive integer, and the unit size is 1/10 seconds. On Timer Time can only be defined in the label of the CARD element or the template element. The syntax form is as follows: content (Content) card> or: content (content) template> Ontimer event only one Attribute, iemer.
It is used to specify a URL address of a hyperlink. When the time TIMER is expired, the user browser opens the corresponding card according to the URL of the hyperlink (HREF). 3.3.3 OneterForward Event OneNterForward event can only occur when the user uses GO tasks or tasks similar to the GO task to locate and browse cards. After setting the OneNterForward event, when the user enters the current card group, the browser will locate the OneTerForward property or the URL address specified in the "HREF) in the tab, and open the URL specified card. OneterForward event needs to be included in the label of the CARD element, Template element, or onevent element, its syntax format is: Contents card> or: Contents template> or: In both formats in the first two formats, the OnNTerForward event is defined as a attribute in the CARD element or the Template element tag. The attribute is the OneNterForWard, which has established a URL address of the HREF. When the user enters the current card, the browser opens the URL specified card. This format has been developed with the GO task. 3.3.4 OneterbackWard event When the user uses the Prev task or similar task to navigate to a card, the OneNterbackWard event can happen. In other words, when the user selects the URL address from the historical stack, the OneNterbackWard event may happen when the card is opened through the browser. Similar to the OneNterForward event, the OneNterbackWard event also needs to be defined in the label of the CARD element, the template element, or onevent element.
Its specific grammar format is as follows: content (content) Card> or: content (content) template> or: Other In the first two formats of the task (Task) onevent>, the ONTERBACKWARD event is defined as an attribute in the CARD element or the template element tag, which is ONTERBACKWARD, which specifies a URL address of a hyperlink (HREF) When the user uses a task item such as prev to return to the address, the browser opens the card specified by the URL. In the latter format, the ONTERBACKWARD event acts as a type value of the onevent element, and combines the tab to specify the URL address of the browser to open the browser. 3.3.5 ONPICK Event Onpick event Generally specified some items via the onpick property, when the user selects or cancels these items, the ONPICK event can be triggered, and the item specified by the onpick property is executed, such as open cards, card groups, or other events. Wait. Onpick events typically define in the tab of the Option element, its syntax format is as follows:
3.3.7 Postfield Elements The postfield element is used to specify the domain name that is transmitted to the original server (Origin Server) when the browser receives the URL request. When transmitting, the actual coding method of the transmission domain and the transmission value is mainly based on the communication method of the browser and the original server. The postfield element is defined by a separate "lt; postfield /> tag, the syntax format is as follows: It has two attributes: Name and Value, their value belongs to VDATA data. Where the Name property is used to specify the name of the transmission domain, the value attribute is used to define the value of the transmission. These two properties are the necessary attributes. 3.4 Variable Setting Element and Variable Settings The requirements for almost all WML content can be implemented by setting parameters, which is convenient for our flexible development WML program. In this section, let's introduce a variable to set an element, then introduce some specific provisions related to variable settings. 3.4.1 setvar element setvar elements are used to specify the value of variables in the current context content, affecting the running tasks from the side. Its syntax format is as follows: It has two properties: Name and Value. The former is used to specify the name of the variable, which is used to specify the value of the desired assignment. Both of these attributes are required, and their data types belong to VDATA. If the variable name specified by the Name property or does not meet the requirements of the operating environment, the setvar element will be ignored in the WML program operation and cannot be played. 3.4.2 Variable Setting WML Programming You can use variables, and the variable must be defined before use. Naming principles and definition methods of variables Our last chapter has been told, here no longer call. Here, we mainly introduce the provisions of setting variables in the WML program. As mentioned earlier, the setvar element can be used to set the variable, and the setvar element is typically defined in the Go, Prev or Refresh elements. In addition, variables can also be set with INPUT and SELECT elements. The former is assigned to the variable as the value entered by the user, and the latter assigns the value of the value of the value attribute selected from the Option element. Variable. The grammatical format and specific usage of the input element and the SELECT element will be introduced later. When setting variables, the following cases should also be attracted: 1) You can set the WML variable using the variable value of WMLScript, and vice versa. That is, when using WML and WMLScript writing programs, they can be programmed using the same name. 2) In the WAP development tool, the tab or dialog box or dialog box or dialog box for the variable is usually provided, and the developer can also set and edit the corresponding variables. 3) In the current context content, you can use the NewContext attribute of the CARD element to eliminate all variables. 3.5 User Enter Processing Elements The user can enter data information or operation information from the card displayed by the WAP phone. WML provides this for this to process elements that handle user input. 3.5.1 INPUT Element Input element is used to define a text entity object, including specific provisions of various attributes such as format, data type, length, value, and variable name of the input text. When the user enters a predetermined specified that meets the input element, the input information is received, and the specified variable is flexible, and the specific processing is given by the browser, and the specific processing opinion is given, and the variable is performed. Initialization operation, such as refresh the card to allow the user to re-enter, or give the user to the input error and wait for further processing instructions.
The input element is an important element that handles user interaction activities in WML programming. It defines separate tags, its syntax format is as follows: in which other attributes are required It is optional. The functions and usage of these attributes are as follows: 1) Name. This attribute is used to specify variables and names used to save users into text. Defining the Name property The WML will be based on the value of the variable name, which is to receive the user input. 2) Title. This property is used for the label of the input element, which is usually a prompt information before the input box. 3) TYPE. Types for specifying the text input area, with two options for Text and Password. The default value is text, the specified user can enter text, and the input text will gradually respond and displayed in the browser. If password is selected, the text you entered as a password text is specified. The WML program receives the input data in accordance with the text entity, and the browser is gradually becoming an asterisk (*) when the user input is displayed, resulting in a confidential purpose . 4) Value. This property is used to specify the value of the variable defined by the Name property, which will be displayed in the input box. 5) Default. This attribute is used to specify the default value of the variable defined by the Name property. 6) format. This attribute is used to format the input data. 7) Maxlength. This attribute is used to specify the maximum length of the user to enter a string. The upper limit of this property is 256 and cannot exceed 256 characters. 8) Emptyok. Used to specify whether the user can enter content in the input box. 9) size. This property is used to specify the width of the input box and the width value is the number of characters. 10) TabINDEX. When used to specify a plurality of input boxes, similar to the specific location of the Tab key in the HTML. 3.5.2 SELECT Element Select List belongs to the input element, allowing the user to select the required item from the list of options. WML not only supports a radio list, and a single option, but also supports multi-selection list, that is, the check item. The SELECT element allows the user to select the desired item from the selection list. The options in the list are defined by the Option elements we have to say, usually a formatted text. When programming, we can use the OptGroup element to divide the Option element's case item into different levels or hierarchical option groups, providing convenience for users. The SELECT element is defined by the
The functions and usage of each attribute of SELECT elements are as follows: 1) Multiple. This property is used to specify whether the selection list can be used to use the check box. 2) Name. This attribute is used to specify the name of the variable that receives the option value, and the variable value is predetermined by the Value property. 3) Value. The default value used to develop the variable defined by the NAME attribute. 4) INAME. The name used to specify a variable containing the row number. 5) iValue. The value used to specify the selected option in the selection list is a value with a ranked nature. 6) Title. The title used to specify the selection list. 7) Tabindex. Used to specify the specific location of the current selection cursor in the selection list, which is the location where the current selection operation will be selected. 3.5.3 Option Elements Option elements are used to define a set of single options in the SELECT element. It defines the
When the user selects the hyperlink during the program, the browser will be introduced to the address specified by the superconnection, such as other card groups or other cards in the same card group. The Anchor element is defined by the and Anchor> tags, which must be real existence, and it is a super connection that can be properly connected. When the ANCHOR element is positioned, the positioning process must be completed by the related task elements, such as GO elements, prev elements, refresh elements, and the like. However, only one positioning task can only be included in the Anchor element, which will cause WML running errors. The syntax format of the Anchor element is as follows: Task text networkor> where the task needs to include a positioning task element. It can be seen that the Anchor element has only one attribute, which is the title property, which is used to define a title attribute that defines the title property to define the header of the fieldset element to prompt the user. Element's super connection title. This title can be used to make a timely understanding of the name of the operation or the information of the prompt information. 3.6.2 A element a element is a simplified form of anchor element, which contains the GO element function that needs to be included in the Anchor element, and no longer contains any other variable settings. It uses the and tags. 3.6.3 IMG element img elements are used to prevent and display an image in formatting text. Of course, the premise is that the browser used by the user must support image display. The IMG element is defined by a separate tag that does not contain other elements. The syntax format is as follows: attribute ALT and SRC are required, others are optional. In addition, it is important to note that the IMG element is placed in the P element, and cannot be placed in the DO or OPTION element. The functions and usage of each attribute of the IMG element are as follows: 1) alt. This property is used to specify whether the mobile phone does not support image display to replace the realistic text text. 2) SRC. This attribute is used to specify the URL address of the image file. 3) localscr. This property is used to specify an icon file that displays the mobile phone ROM. 4) Align. This property is used to specify an image display is an alignment relative to the current text. 5) HEIGHT. Used to set the height of the image display. 6) Width. Similar to the Height property, the width or width of the image is used to set the image display. 7) vSpace. This attribute is used to specify the upper and lower margins of the image display, the default value is 0.8) HSPACE. Similar to the vSpace property, this property is used to specify the left distance and right distance when the image is displayed. 3.6.4 TIMER Element TIMER Element is used to set a timer, which can delay the waiting operation of the card set, card, or implementation of the WML program, or switch between the card group and the card to achieve the animation effect. A card can only use a Timer element, ie, it can only set a timer. When the user enters the Timer's card, the timer will start working, and the time value will gradually decrease. The time value unit specified by the Timer element is 1/10 seconds.
Its syntax format is as follows: Its attributes are required, and the Name property is optional. The name attribute is used to specify the name of the variable indicating the time value, the value of the variable is determined by the timer value of the timer, and the time value is reduced, the value of the variable is also reduced, and it remains unchanged. The Value property is used to specify the initial value of the variable defined by the Name property. If the variable defined by the Name property is not worth no value, the variable will use the value specified by the value attribute; otherwise, the change amount will ignore the value of the value attribute. If there is no name attribute, that is, no time variable is specified, the Timer element specified Timer will still be delayed by the value of the value attribute. 3.7 Text formatting and its element WML program, in order to make the text present a rich style, WML provides some elements for formatting, and we can label and control text through these elements and their corresponding tags. Thereby achieving different display effects. 3.7.1 Enhanced Elements Enhancements are some paired labels for specifying the enhancement display information of the text. For example, the B element can be controlled by the B> tag, which is displayed in bold words. 3.7.2 BR element "Br" is Break, is an element for wireping, which is defined using a separate tag. The role of the BR element is equivalent to inserting a carriage. 3.7.3 P elements "P" refer to paragraph, P element used to divide the paragraph, is the current text wrap and insert a blank line. The P element can be defined using a separate
tag or a pair of
and P> tags. Its syntax format is:
or text p> 1) align. This attribute is used to set the alignment of the paragraph in the browser, there are three values of LEFT, CENTER, and RIGH. These three parameter values represent the currently defined text paragraphs of the P element and the left, middle and right sides of the browser window. The default value is LEFT, and the paragraph is aligned with the left side of the browser window. 2) MODE. This attribute is used to specify the next paragraph. 3.7.4 TD element TD elements are used to specify the content of the table cell. The syntax format is as follows:
Cell content td> 3.7.5 TR element WML forms in accordance with line, column for organization. A form consists of several lines, each consisting of several columns. The TR element is used to define the line of the table. Its syntax format is as follows:
cell content td> tr> 3.7.6 Table element table element with TR element, TD element, can be used to create a table that can accommodate text and images, and sets each table Column in the column of text and image. The syntax format is as follows:
or
content table> All attributes The functions and usage are described below: 1) Align. This attribute is used to specify alignment of text and images in each column.