type为number的input标签输入小数的方法

input标签当type为number时,只能输入数字input

其中有max和min属性,是限制输入数字的大小,当想输入小数时,能够把步数step改成小数,如step = 0.1input标签

如:标签

<input type = "number" value = "10" max = "20"  min = "10"  step = "0.1">数字

相关文章
相关标签/搜索