WML development tutorial -- display form of WML learning

Source: Internet
Author: User
Similar to the FORM in HTML, fieldset can contain a set of FORM options, but is not required. As mentioned above, when the ordered of the card is set to false, the mobile phone can display a summary CARD to summarize the valid options, so that you can select the form option from it to fill in HTML-like , Can contain a set of form options, but not required. As mentioned earlier, when When the value of ordered is set to false, the mobile phone can display a summary CARD to summarize the valid options, so that you can select the form options to fill in, the summary CARD is based on And an independent input box And menus . Syntax,Form ContentThe optional title attribute not only represents the form name, but also serves as the title of the selected item in the summary CARD. The form content can be nested., Input box , Menu And necessary prompt text.   , Used to input text, except the name attribute is necessary, other optional.

  • Name attribute, which specifies the variable name used to store the input text.
  • Title attribute, the name of the input box, which can also be used as the option name on the summary CARD page.
  • Type attribute. the default value is text. If password is selected, the input data is displayed *.
  • The value attribute is equivalent to the following default attribute in syntax and action,
  • The default attribute specifies the default value of the input box, that is, the default value of the variable specified by the name attribute. when a user inputs a new value, the value is invalid. if the value does not comply with the following format attribute, the default value is also neglected on the mobile phone.
  • The format attribute is used to visualize the imported data. the available tags are as follows. When an application is used, the "one digit mark" and "* Mark" are available. The former represents N markup characters, for example, 3X. The latter represents any markup character (less than the value of the maxlength attribute.

Mark description

A. Any symbols or uppercase letters (excluding numbers)

A. Any symbol or lowercase letter (excluding digits)

N any number (excluding symbols or letters)

X any symbol, number, or upper-case letter (cannot be changed to lower-case letters)

X any symbol, number, or lowercase letter (cannot be converted to uppercase letters)

M any symbol, number, or upper-case letter (can be converted to lower-case letters) or multiple characters, the first character is capitalized by default

M any symbol, number, or lowercase letter (can be converted to uppercase letters) or multiple characters, the default is the first character in lowercase

  • The maxlength attribute specifies the maximum length of characters that a user can enter. The maximum length is 256 characters.
  • Emptyok attribute, indicating whether the user can enter the input box. the default value is false.
  • Size attribute. the length of the input box. it is not supported currently.
  • The tabindex attribute is similar to the option on which the focus falls after pressing the TAB key in an HTML form. this value determines the order of selection, followed by a large number. Not supported currently.

Test4.wml


/DTD/wml_1.1.xml '>



USERNAME: EHere 'format = '* m' emptyok = 'false' maxlength = '12' tabindex = '1'/>
PASSWORD: Emptyok = 'false' maxlength = '8' tabindex = '2'/>
COMMENTS: NtsHere 'format = '* m' emptyok = 'true' maxlength = '30' tabindex = '3'/>



Add the preceding example Change the value of odered in to 'true' and try again in

And

Internal participants And Try it.

  The menu is similar,AndCan containAndTag. The syntax is as follows. all attributes are optional:

   Ault 'iname = 'index _ var' ivalue = 'default' tabindex = 'n'>
   Menu content
  
Event or text
  
  

  • Title attribute, as shown above.
  • Multiple attribute, which specifies whether a user can select multiple items. the default value is false.
  • Name attribute, used to store the variable name of the selected item. its value isThe value attribute of the tag. if you do not select the tag and do not use the default attribute to specify the default value, the mobile phone will assign the conversion value to an empty string ''. for multiple selections, use"; "to exit each value.
  • Default attribute. you can assign a default value to the variable specified by the name attribute.
  • The iname attribute is used to record the status of the selected item. the corresponding value starts from 1. If not selected, the value
  • 0.
  • Ivalue attribute, used to record the status of the default value.

  MultipleGroup,AndCan also containAndThe tag is not supported yet.

  , Similar toTo display the options of the menu.AndIt can contain the event (see the following section) and the display text of the menu.Optional. The value attribute is used to supply the value. after the value is selected, the value is assignedThe variable specified by the name attribute. Onpick attribute, used to specify the URL of the page opened after the user selects this item and presses the ACCEPT key.Test5.wml /DTD/wml_1.1.xml '> Please select a city... Beijing Shanghai Hongkong
Please select columns...

News
Sports
Entertainment




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.