阻止浏览器自动填写表单用户名和密码字段 [英] Stop browser from auto filling the form username and password fields

查看:61
本文介绍了阻止浏览器自动填写表单用户名和密码字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome浏览器中,我已经保存了用户名和密码.

In the Chrome browser, I have saved the username and the password.

现在,如果我导航到其他形式,并且其中包含其他内容的用户名和密码,则我保存的内容将在此处自动填充.

Now, if I navigate to some other form and it contains the username and password for some other stuff, the one I saved is auto-populated here.

我该如何阻止呢?

推荐答案

autocomplete = off 不会阻止填写凭据时,请使用以下命令-

When autocomplete=off would not prevent to fill in credentials, use following -

修复浏览器自动填充:只读并设置可写焦点(单击和标签).

fix browser autofill in: readonly and set writeble on focus (click and tab).

 <input type="password" readonly onfocus="this.removeAttribute('readonly');" onblur="this.setAttribute('readonly','');"/>

这篇关于阻止浏览器自动填写表单用户名和密码字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆