問題:
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?