WAP (WML) Development tutorial 7--WML Learning Keyboard Input Events

Source: Internet
Author: User
Tags prev reset

WML events are basically divided into two categories, one is the keyboard (including the soft-hard button) input events, with <do> tags to

Processing, the other is related to the internal page of the event, with <onevent> tags to deal with.

The <do> syntax is as follows: <do type= "type" label= "label" name= "name" optional= "Fals

E|true "> Task </do>, the task is the previous four kinds of tasks mentioned. The <do> attribute, type is required, and its

He is optional.

The *label property specifies the display text of the soft button on the screen. The current Type property is Delete,help,

This property is not valid when prev.

*name attribute, for <do> to take a name, the same card in the <do> can not duplicate. If the card grade <do> and

Deck <do> The same name, the deck level <do> is overwritten.

The *optional property specifies whether the phone can ignore this event, and the default value is False.

The *type property specifies the event that is triggered, as follows;

Type value trigger Reason

Accept calls the Accept button mechanism

Delete Call to delete button mechanism

Help calls the Help button mechanism

Options invoke Select button mechanism

Prev Call prev button mechanism

Reset mechanism to erase and reset phone status (not currently supported)

Unknown call unknown mechanism, equals type= "" (not currently supported)

Vnd. Co-type calling vendor-specific mechanisms (not currently supported)

x-*, x-* for later use (not reserved) (not currently supported)

Test6.wml

---------------

<?xml version= "1.0"?>

<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en" "http://www.wapforum.org

/dtd/wml_1.1.xml ">

<wml>

<meta http-equiv= "Cache-control" content= "max-age=0"/>

<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= "/>"

</p>

</card>

<card id= "CARD01" >

<p>

You name is $ (USERNAME:NOESC).

</p>

</card>

</wml>

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.