相关疑难解决方法(0)

禁用HTML5表单元素的验证

在我的表单中,我想使用新的HTML5表单类型,例如<input type="url" />(有关这里类型的更多信息).

The problem is that Chrome wants to be super helpful and validate these elements for me, except that it sucks at it. If it fails the built-in validation, there's no message or indication other than the element getting focus. I prefill URL elements with "http://", and so my own custom validation just treats those values as empty strings, however Chrome rejects that. If I could change its validation rules, that would work …

forms validation html5 input

411
推荐指数
8
解决办法
28万
查看次数

标签 统计

forms ×1

html5 ×1

input ×1

validation ×1