阻止谷歌浏览器弹出密码框

646 阅读1分钟
原理是因为浏览器根据表单的type=password来判断密码域
,因此只要在加载的时候没有出现type=password的标签就可以了
在input标签中使之在onfocus状态下
,才将该input的type变成password
<input type="text" name="password"
onfocus="this.type='password'" autocomplete="off"/>