是否有 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?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章