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

posted @ 2019-09-18 14:29  達達尼亞  阅读(4672)  评论(0编辑  收藏  举报