自动完成=“关闭"不适用于 Google Chrome [英] autocomplete="off" not working for Google Chrome

查看:35
本文介绍了自动完成=“关闭"不适用于 Google Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题过去曾被问过几次,但不幸的是我无法禁用谷歌浏览器的自动填充(v.36.0.1985.125 m)

This question has been asked Several times in the past but unfortunately there's no way i could disable autofill for Google Chrome (v.36.0.1985.125 m)

我已经试过了

AutoComplete=Off"不适用于 Google Chrome 浏览器

如何阻止 Chrome 预填充输入框?

如何禁用谷歌浏览器使用 twitter bootstrap typeahead 时的建议列表?

目前测试的代码

<form autocomplete="off">

<asp:textbox autocomplete="off">

AutoCompleteType="Disabled"

但我仍然在登录页面上获得自动归档的数据.即使更改了文本框 ID,也会填充密码.

But I still get autofiled data on my login page. Passwords are populated even if Textbox Ids are changed.

推荐答案

由于我遇到了同样的问题,而且随着浏览器最近的更新,似乎所有替代方案"都停止工作,因此我遇到了一个脏问题"" 完全让我困惑的解决方案.

Since I have been having this very same issue and it seems all "alternatives" stopped working as the browsers have been getting recent updates, I came across a "dirty" solution that baffled me completely.

如果我们继续在每个想要禁用自动完成功能的字段并将其自动完成属性设置为无效值(只有off"和on"有效),浏览器将停止尝试自动填充这些字段,因为.

If we go on each field we want to disable the autocomplete feature and set its autocomplete attribute to an invalid value (only "off" and "on" are valid), the browser will stop trying to autofill those fields because of that.

惊讶?我也是!

示例:

<input type="text" autocomplete="stopdoingthat" />

显然它有效.愚蠢,我知道,但它是一个肮脏"的,现在确实有效.

And apparently it works. Stupid, I know, but it's a "dirty" one that actually works for now.

这篇关于自动完成=“关闭"不适用于 Google Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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