解決chrome瀏覽器自動填充密碼


chrome會自動填充密碼,解決方法很簡單

使用下面的參考代碼即可:

<input type="password" readonly οnfοcus="this.removeAttribute('readonly')" value="" autocomplete="off">

使用readonly 屬性和 onfocus事件來處理,則可以, autocomplete="off"  沒感覺出來起作用, autocomplete 屬性是 HTML5 中的新屬性。

原文地址:https://blog.csdn.net/jslcylcy/article/details/53022246


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM