案例:html案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<p>
6
Depending on browser support:<br>
7
Numeric restrictions will apply in the input field.
8
</p>
9
10
<form action="/example/html/form_action.aspx">
11
  Quantity (between 1 and 5):
12
  <input type="number" name="quantity" min="1" max="5">
13
  <input type="submit">
14
</form>
15
16
<p><b>Note:</b> type="number" is not supported in IE9 and earlier.</p>
17
18
</body>
19
</html>

 运行结果 
 北美留学生论坛