major difference between WML and HTML is that WML has build-in
support of variables. You can assign a value to a variable or output
the value of a variable in WML without involving any scripting
languages. To use variables in HTML, a client-side scripting language
20.1. Setting Variable
Values in WML
WML, variables do not have to be declared explicitly. You can choose
a variable name you like and assign a value to it directly. If you
read a variable without assigning a value to it earlier, you will
obtain an empty string.
names in WML are case-sensitive. The first character of a variable
name must be a letter or an underscore. The rest of the characters
can be letters, numbers or underscores. Other characters, such as
punctuations, are not permitted.
variables are stored as string. They have a global scope, which means
once you have set the value of a variable, you can read it in any
cards and decks.
can set the value of a variable in the following ways:
the <setvar/> tag
data collection tags <select> and <input/>
the setVar() function of WMLScript's WMLBrowser standard
Feedback Form (ExpandCollapse