阻止浏览器记住密码功能干扰表单填充
2017-12-13
我知道有 4 种方法,具体可以详细的去试试看:
1.把 input type=”password” 改成 input type=”text” 并在后面加上 onfocus=”this.type=’password’”
2.在文档加载完成后将密码输入框设置为空:
1 | window.load = function () { |
3.在用户名和密码之间加上一个隐藏的文本框:
1 | <input type="text" name="name" /> |
4.使用 html5 的属性:
1 | <pre name="code" class="html"> |