编辑下面的代码:【加编码】
<html> <body> <form action="demo-form.php"> 输入 1980-01-01 之前的日期: <input type="date" name="bday" max="1979-12-31"><br> 输入 2000-01-01 之后的日期: <input type="date" name="bday" min="2000-01-02"><br> 数量 (在1和5之间): <input type="number" name="quantity" min="1" max="5"><br> <input type="submit"> </form> <p><strong>注意:</strong> Internet Explorer 9及更早IE版本,Firefox不支持input标签的 max 和 min 属性。</p> <p><strong>注意:</strong> 在Internet Explorer 10中max 和 min属性不支持输入日期和时间,IE 10 不支持这些输入类型。</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂