[英]How can I take input from 1 to 10 only in HTML/JQuery?
How can I take input only 1 - 10
, ( 1,2,3,4,...,10
) in HTML input tag?如何在 HTML 输入标签中仅输入
1 - 10
, ( 1,2,3,4,...,10
)?
If I enter 9
than the code should not allow me to enter anymore digits.如果我输入
9
,那么代码将不允许我输入更多数字。 And if I enter 1
than I can only enter 0
as the next digit.如果我输入
1
,那么我只能输入0
作为下一个数字。
try below mention tag试试下面提到的标签
<input type="number" name="numberInput" min="1" max="10">
you can use您可以使用
for() {}
Method for iterate input tag.迭代输入标签的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.