WML learning (6): Events

Source: Internet
Author: User
WML events are classified into two categories: Keyboard (including soft and hard buttons) input events, which are handled using the do tag, and events in the coherent pages, use the onevent tag for processing. Do syntax: dotype = "type" label = "label" n event
WML events are classified into two categories: Keyboard (including soft and hard buttons) input events Tag to process, the other is the event inside the coherent page, Label.

   Syntax: Task A task is a conditional task. Type is required, and others are optional.
* Label attribute, which specifies the text displayed by the soft button on the screen. The current type attribute is delete, help, and prev, which is invalid.
* Name attribute, which is Get a name in the same CARD Duplicate names are not allowed. Assume that And DECK-level With the same name, the DECK-level .
* The optional attribute specifies whether the mobile phone can ignore this event. the default value is false.
* Type attribute, specifying the event to be triggered, as shown in the following code;
Reason for triggering the type value
Accept calls the ACCEPT button mechanism
Delete: call the DELETE button mechanism
Help call the HELP button mechanism
Options call the select button mechanism
Prev call the PREV button mechanism
The reset mechanism when the RESET call clears and resets the mobile phone status (not supported currently)
Unknown calls the unknown mechanism, that is, type = ''(not supported currently)
Vnd. co-type calls vendor-specific mechanisms (not supported currently)
X-*, x-* for future applications (not retained) (not supported currently)

Test6.wml
---------------












NAME:





You name is $ (userName: noesc ).





   The syntax is as follows, Task , The value of the required attribute type is as follows:
Type value: if the user performs the following control, the task will be executed.
Onpick user selects or does not select one .
Onenterforward user application When the task reaches a CARD.
Onenterbackward user application When the task is returned to the previous CARD, or when you press the BACK button.
Ontimer when Expired.

Test7.wml
---------------









Please select a city...
BeijingShanghaiHongkong
& Lt;/p>



You are Living in $ (city: noesc)





   It can be used to actively perform a task after the user does not perform any control for a period of time. any task that activates the CARD page and user control will start. While the task is in progress, End. Each CARD can have only one , One Only one task can be triggered. Syntax: Name is an optional attribute and is specified as a variable name. when the CARD is exited, the variable stores the timer value. when the timer times out, the mobile phone sets the variable to 0; value is a required attribute. it is used to set the timer value. The minimum unit is 0.1 seconds.

Test8.wml
---------------










5S, goto card2









Here is card2!





I would like to mention it again,     The three must be written in the above order.

In addition, you can participate in the DECK level. To run the event *** at the DECK level. The syntax is as follows:
  
   Or
  


Test9.wml
---------------

















Press ACCEPT...





Here is card01





Here is card02




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.