2022-06-12 633
HTML <input> step 属性,合法值的范围
HTML <input> 标签
实例
带有指定的合法数字间隔的输入字段的 HTML 表单:
<form action="demo-form.php"> <input type="number" name="points" step="3"> <input type="submit"> </form>
定义和用法
step 属性规定 <input> 元素的合法数字间隔。
实例:如果 step="3",则合法数字应该是 -3、0、3、6,以此类推。
提示:step 属性可以与 max 和 min 属性配合使用,以创建合法值的范围。
注意:step 属性适用于下面的 input 类型:number、range、date、datetime、datetime-local、month、time 和 week。
HTML 4.01 与 HTML5之间的差异
step 属性是 HTML5 中的新属性。
语法
<input step="number">
原文链接:https://77isp.com/post/1173.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态