我目前正在尝试优化我的网页上的表单。HTML Validator显示以下错误:
The autofill field name “postal-code” is not allowed in this context. 我不知道为什么,因为它做了它应该做的事情。自动填充将插入邮政编码。下面是元素:
<td><input type=number name="changeZip" min=00000 max=99999 autocomplete="postal-code"></td>此元素具有相同的错误:
<input class="login" type="number" name="txtZip" value="" required max="99999" min="00000" placeholder="Postleitzahl" autocomplete="postal-code"/>根据错误消息,为什么这里不允许这样做?我在谷歌上找不到任何这方面的东西。
谢谢。
发布于 2020-11-03 00:16:09
type属性需要为"text“。有些国家的邮政编码使用字母和数字的组合。
因此,您的输入元素应该是
<input type="text" name="changeZip" minLength="5" maxLength="5" autocomplete="postal-code">https://stackoverflow.com/questions/64540605
复制相似问题