wml语句用法列表

作者在 2010-01-07 01:06:26 发布以下内容
Decks and cards Timers Variables Anchored links Layout and text formatting
Events Tasks Images User input Special characters

Decks and cards

Element
Syntax
<wml> <wml>
<wml xml:lang="lang" >
content
</wml>
<card> <card id="name"
title="label"
newcontext="boolean"
style="style"
onenterforward="url"
onenterbackward="url"
ontimer="url" >
content
</card>
<template> <template onenterforward="url"
onenterbackward="url"
ontimer="url" >
content
</template>
<head> <head>
content
</head>
<access> <access domain="domain"
path="path" />
<meta> <meta name="name"|http-equiv="name"
content="value"
forua="true | false" />

Timers

Element
Syntax
<timer> <timer name="variable"
value="value" />

Variables

Element
Syntax
<setvar> <setvar name="name"
value="value" />

Anchored links

Element
Syntax
<anchor>
<a> <a title="label" >
task
text
</a>

Events

Element
Syntax
<do> <do type="type"
label="label"
name="name"
optional="boolean" >
task
</do>
<onevent> <onevent type="type" >
task
</onevent>

Tasks

Element
Syntax
<go> <go href="url"
sendreferer="boolean"
method="method"
accept-charset="charset"
content
</go>
<prev> <prev>
content
</prev>
<noop> <noop/>
<refresh> <refresh>
content
</refresh>

Images

Element
Syntax
<img> <img alt="text"
src="url"

localsrc="icon"
align="alignment"
height="n"
width="n"
vspace="n"
hspace="n" />

User input

Element
Syntax
<input> <input name="variable"
title="label"
type="type"
value="value"

default="default"
format="specifier"
emptyok="boolean"
size="n"
maxlength="n"
tabindex="n" />
<select> <select title="label"
multiple="boolean"
name="variable"

default="default"
iname="index_var"
ivalue="default"
tabindex="n" >
content
</select>
<option> <option title="label"
value="value"

onpick="url" >
content
</option>
<optgroup> <optgroup title="label" >
content
</optgroup>
<fieldset> <fieldset title="label">
content
</fieldset>

Layout and text formatting

Element
Syntax
<b> <b>
text
</b>
<big> <big>
text
</big>
<em> <em>
text
</em>
<i> <i>
text
</i>
<p> <p align="alignment"
mode="wrapmode" />
<small> <small>
text
</small>
<strong> <strong>
text
</strong>
<table> <table align="alignment"
title="label"

columns="n"/>
<td> <td>content</td>
<tr> <tr>
<td>
content</td>
</tr>
<u> <u>
text
</u>

Special characters

Element
Display character
&lt; < (less than)
&gt; > (greater than)
&apos; ' (apostrophe)
&quot; " (quote)
&amp; & (ampersand)
$$ $ (dollar sign)
&nbsp; Non-breaking space
&shy; Soft hyphen

推荐文章 | 阅读 1129 次
文章评论,共0条
游客请输入验证码