美文网首页
防止浏览器记住密码,登录后对所有input禁止填充账户密码的方法

防止浏览器记住密码,登录后对所有input禁止填充账户密码的方法

作者: Bior | 来源:发表于2019-08-28 11:42 被阅读0次

1.忽悠浏览器。

<input type="text" style="display: none;" name="xx">

<input type="password" style="display: none;" name="xx">

2.把input type=”password” 改成 input type=”text” 并在后面加上 onfocus=”this.type=’password'”

3.在文档加载完成后将密码及用户输入框设置为空

4.使用html5的属性 (<input type="password" name="pass" autocomplete="off">)但是这种方案不兼容某些Chrome、Firefox;

相关文章

网友评论

      本文标题:防止浏览器记住密码,登录后对所有input禁止填充账户密码的方法

      本文链接:https://www.haomeiwen.com/subject/lujpectx.html