如何在2020年禁用google chrome输入字段自动填充。
我尝试这样做:
<form autocomplete="off">
<input type="text" id="input_name" autocomplete="none"/>也可以试试:autocomplete="somethingelse"
此外,我尝试了一些旧的时尚的东西,但随着谷歌浏览器的最新更新,我不能禁用输入字段的自动填充。
你知道什么新的解决方案吗?如果您没有在2020年测试过该解决方案,请不要给出旧的建议或示例链接。
谢谢。
发布于 2020-04-17 16:00:27
目前还没有针对这个Chrome "bug“的解决方案,Google不想修复它。
关注https://bugs.chromium.org/p/chromium/issues/detail?id=587466获取更多信息。
发布于 2020-06-26 03:55:51
这个问题可能有两个月了,但我偶然发现了这个自动填充问题,尝试了6天的不同方法是很烦人的。
这就是对我有效的方法,我希望它能帮助使用chrome版本>= 83.x.x的人。
<input name="email" type="email" id="emailId" autocomplete="{anything}"/>
<input name="password" type="password" id="passwordId" autocomplete="{something}"/>发布于 2021-02-26 09:34:31
你可以试试https://github.com/terrylinooo/disableautofill.js
disableautofill.js采用了跳过浏览器行为的方式,所以它可以正常工作。
<script src="https://cdn.jsdelivr.net/npm/disableautofill@2.0.0/dist/disableautofill.min.js"></script>用法:
var daf = new disableautofill({
'form': '#testForm', // Form id
'fields': [
'.test-pass', // password
'.test-pass2' // confirm password
],
'debug': true,
'callback': function() {
return checkForm(); // Form validator
}
});
daf.init();https://stackoverflow.com/questions/61196522
复制相似问题