是否有 W3C 有效的方法来禁用 HTML 表单中的自动完成功能? - Is there a W3C valid way to disable autocomplete in a HTML form?

问题:

When using the xhtml1-transitional.dtd doctype, collecting a credit card number with the following HTML使用xhtml1-transitional.dtd文档类型时,使用以下 HTML 收集信用卡号

<input type="text" id="cardNumber" name="cardNumber" autocomplete='off'/>

will flag a warning on the W3C validator:将在 W3C 验证器上标记警告:

there is no attribute "autocomplete".没有属性“自动完成”。

Is there a W3C / standards way to disable browser auto-complete on sensitive fields in a form?是否有 W3C / 标准方法来禁用表单中敏感字段的浏览器自动完成功能?


解决方案:

参考一: https://stackoom.com/question/2RT2
参考二: Is there a W3C valid way to disable autocomplete in a HTML form?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章