相关疑难解决方法(0)

如何限制HTML5"数字"元素中的可能输入?

对于<input type="number">元素,maxlength不起作用.如何限制该maxlength数字元素?

html html5 numbers input max

330
推荐指数
19
解决办法
62万
查看次数

为什么<input type ="number"maxlength ="3">在Safari中不起作用?

我喜欢输入最多3个字符.在Firefox中一切正常我只能在输入中写入3个数字 - 但在safari中你可以在里面写很多数字.

你可以在这两个浏览器中测试它:http://flowplayer.org/tools/demos/validator/custom-validators.htm

现在我用验证插件意识到它 - 但只是为了兴趣我想知道为什么这不起作用?

编辑:

有了这个它的工作

<input class="required" id="field" type="text" maxlength="3" pattern="([0-9]|[0-9]|[0-9])" name="cvv"/>
Run Code Online (Sandbox Code Playgroud)

回答:如何防止文本元素中的字母?

safari html5 maxlength

33
推荐指数
4
解决办法
10万
查看次数

标签 统计

html5 ×2

html ×1

input ×1

max ×1

maxlength ×1

numbers ×1

safari ×1