- 新的控件类型
–<input type=”url|email|date|tel|search|datetime|date|month|week|datetime-local|number|range|color”>, <select data=”http://domain/getoptions”></select>
- 文件上传控件
–<input type=”file” accept = “image/png” />
- 重复的模型
–add, remove, move-up, move-down
- 内建表单验证
–<input type=”email” required />, <input type=”number” min=10 max=100 />
- XML Submission
–application/x-www-form+xml
举例:
<form action=’/register’ enctype=”application/x-www-form+xml” method=”post”>
<p>
<label for=’name’>ID(请使用Email注册)</label>
<input name=’name’ required type=’email’ />
<p>
<label for=’password’>密码</label>
<input name=’password’ required type=’password’ />
<p>
<label for=’birthday’>出生日期</label>
<input type=’date’ name=’birthday’ />
<p>
<label for=’gender’>国籍</label>
<select name=’country’ data=’countries.xml’></select>
<p>
<label for=’photo’>个性头像</label>
<input type=’file’ name=’photo’ accept=’image/*’ />
<table>
<thead>
<td><button type=”add” template=”questionId”>+</button> 保密问题</td>
<td>答案</td>
<td></td>
</thead>
<tr id=”questionId” repeat=”template” repeat-start=”1″ repeat-min=”1″ repeat-max=”3″>
<td><input type=”text” name=”questions[questionId].q” /></td>
<td><input type=”text” name=”questions[questionId].a” /></td>
<td><button type=”remove”>删除</button></td>
</tr>
</table>
<p><input type=’submit’ value=’send’ class=’submit’ /></p>
</form>