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">