Event
WML events are basically divided into two categories, one is the keyboard (including soft and hard button) input events, with the <do> tag to deal with, the other is related to the internal page events, with the <onevent> tag to deal with.
The <do> syntax is as follows: <do type= "type" label= "label" name= "name" optional= "False|true" > Task </do> The task is the four tasks mentioned previously. In <do> properties, type is required and the other is optional.
*label property that specifies the text that the soft button displays on the screen. This property is not valid when the Type property is Delete,help,prev.
*name property, for <do> name, the same card in the <do> can not duplicate. If the card-level <do> and deck <do> have the same name, overwrite the deck-level <do>.
*optional property, specifies whether the phone can ignore this event, and the default value is False.
*type property, specifies the event that is triggered, as follows;
Type value trigger Reason
Accept Call Accept button mechanism
Delete call Delete button mechanism
Help invokes the Help button mechanism
Options call Select button Mechanism
Prev Call prev button mechanism
Reset mechanism (currently not supported) reset call to erase and reset phone status
Unknown calls the unknown mechanism, equal to Type= "" (not currently supported)
Vnd. Co-type calls vendor-specific mechanisms (not currently supported)
x-*, x-* for later use (not reserved) (not currently supported)
The <onevent> syntax is as follows, <onevent type= "type" > Task </onevent>, and the required attribute type has the following values:
Type value performs a task if the user performs the following actions
Onpick the user chooses or does not select a <option>.
Onenterforward users use <go> tasks to arrive at a card.
Onenterbackward users use <prev> tasks to return to the previous card, or press the Back button.
OnTimer when <timer> expires.
<timer/> can be used to automate a task after a period of time when the user does nothing, and any task and user action that activates the card page will start <timer/>, and,<timer/> will stop when the task is in progress. Each card can have only one <timer/>, and a <timer/> can only trigger one task. The syntax is as follows: <timer name= "variable" value= "value"/>, where name is an optional attribute, specified as a variable name, and when exiting the card, the variable stores the value of the timer at this time, and when the timer times out, the cell phone sets the variable to 0 The value is a required attribute that sets the timer's timing value, with a minimum unit of 0.1 seconds.
Just to mention it.,<onevent> <timer> <do> must be written in the order listed above.
In addition, <TEMPLATE> can be added at the deck level to bind the event to the deck level, the syntax is as follows:
<template onenterforward= "url" onenterbackward= "url" ontimer= "url" >
<do> or <onevent>
</template>
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.