==============================================
1.required --- 必填字段验证
2.minlength, maxlength --- 字符长度验证
3.min, max --- 数值范围验证 用于number,range 和日期时间类型
4.step --- 步长验证
5.pattern --- 正则表达式验证
6.novalidate(form中) ---禁用表单验证
formnovalidate(submit中) ---禁用表单验证
<form action=" " method="post">
<div>用户名:<input type="text" minlength="3" maxlength="10" required></div>
<div>密码:<input type="password" minlength="6" maxlength="8" required></div>
<div>邮箱:<input type="email" pattern=" ^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$" required></div>
<div>日期:<input type="date" min="2016-02-05" max="2017-02-05" required> </div>
<div>订购数量:<input type="number" min="10" max="50" step="5" required> </div>
<div>音量:
<form oninput="out.value=in.value">
<input type="range" name="in" value="0">
<output name="out">0</output>
</form>
</div>
<input type="submit">
</form>