日期:2014-03-23  浏览次数:20923 次

  Fieldset 提供了一种控件分组的功用,绝对于Optgroup它的潜在价值更强了,但是需求客户端设备的支持才能获得显示效果。

  相关属性:

  title 标题

  综合示例:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>

<template>
  <do type="options" label="Back">
    <prev/>
  </do>
</template>

<card id="fields">
<p> Field Type:
 <select title="Field type">
  <option onpick="#nested">Nested</option>
  <option onpick="#password">Password</option>
 </select>
</p>
</card>

<card id="nested">
<onevent type="onenterbackward">
  <prev/>
</onevent>
<do type="accept" label="Done">
  <go href="#done"/>
</do>
<p>
<fieldset title="name">
  First Name:
    <input title="First" name="fname"/>
  Last Name:
    <input title="Last" name="lname"/>
</fieldset>
Gender:
<select title="Gender" name="gender">
  <option value="male">Male</option>
  <option value="female">Female</option>
</select>
</p>
</card>

<card id="done">
<p> $fname $lname is a $gender. </p>
</card>

<card id="password">
<onevent type="onenterbackward">
  <prev/>
</onevent>
<do type="accept" label="Done">
  <go href="#passwd_done"/>
</do>
<p> Input a password:<br/>
Min 3 chars.
<input title="Password" name="passwd" type="password" format="*m"/>
</p>
</card>

<card id="passwd_done">
  <p> Password was $passwd. </p>
</card>
</wml>