爱玩科技网
您的当前位置:首页怎么禁止自动填充浏览器记住的密码

怎么禁止自动填充浏览器记住的密码

来源:爱玩科技网

1.把input type=”password” 改成 input type=”text” 并在后面加上 οnfοcus=”this.type=’password’”,
2.在文档加载完成后将密码输入框设置为空:

window.load = function(){   
    document.getElementById('密码域ID').value='';   
};   

3.在用户名和密码之间加上一个隐藏的文本框:

<input type="text" name="name">  
<input type="hidden">  
<input type="password" name="pass">  

4.使用HTML5的属性:

<input type="text" name="name" autocomplete="off">  
<input type="password" name="pass" autocomplete="off">

因篇幅问题不能全部显示,请点此查看更多更全内容