解决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