编辑下面的代码:【加编码】
<html> <body> <form action="demo-form.php"> 数量 ( 1 到 5 之间): <input type="number" name="quantity" min="1" max="5"> <input type="submit"> </form> <p><b>注意:</b>Internet Explorer 9 及更早IE版本不支持 type="number" 。</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂