HTML5输入类型的数字在Firefox中不起作用 [英] HTML5 input type number not working in firefox
问题描述
我正在使用 HTML5输入类型=数字
。它在Chrome浏览器中完美工作,但它不适用于Firefox和IE9。
I am using HTML5 input type=number
. Its working perfectly in Chrome browser, but its not working in Firefox and IE9.
我想通过一个$ c $增加数量c> ie
step = 1
并且我还设置了 min = 1
。
I want to increment the quantity by one
i.e. step=1
and also I have set min=1
.
我使用以下代码:
I am using the following code:
<form action="" class="cart" method="post" enctype='multipart/form-data'>
<div class="quantity">
<input type="number" step="1" min="1" name="quantity" value="1" title="Qty" class="input-text qty text" />
</div>
<button type="submit" class="single_add_to_cart_button button alt">Add to cart</button>
</form>
是否有任何补丁或黑客可以在Firefox和IE9中使用它。或者,可能的解决方案是什么。
Is there any patch or hack to make it work in Firefox and IE9. Or else, what could be the possible solution for that.
推荐答案
注意:互联网不支持标签的min属性Explorer 9和更早版本,或Firefox。
Note: The min attribute of the tag is not supported in Internet Explorer 9 and earlier versions, or in Firefox.
注意:min属性在Internet Explorer 10中不适用于日期和时间,因为IE 10不支持这些输入类型。
Note: The min attribute will not work for dates and time in Internet Explorer 10, since IE 10 does not support these input types.
来源: http:// www.w3schools.com/tags/att_input_min.asp
这篇关于HTML5输入类型的数字在Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!