Html5数字输入步骤和精度 [英] Html5 number input step and precision

查看:637
本文介绍了Html5数字输入步骤和精度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到如何为输入定义一个步数值和一个精度[数字]

1.01 0.01 的步骤时,$ c>被认为是无效的。
但是在这种情况下,我无法指定具体的步骤。



大数字的问题相同。如果我指定了 1000 和用户类型 1001 的值,则该值被视为无效 ...



你可以看看这个例子

解决方案

我想你想禁用步骤验证。如果是这样, step =any应该可以工作。


I can't find out how to define a step value and a precision to a input[number]

1.01 is considered as invalid until I specify a step of 0.01. But In that case I can't specify a specific step.

Same issue with big number. If I specify a step of 1000 and the user type 1001 the value is considered invalid...

You can have a look to this example

解决方案

I guess you want to disable step validation. If so, step="any" should work.

这篇关于Html5数字输入步骤和精度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆