html - Chrome中的自动填充错误?
问题描述
这里发生了什么?在 Chrome 中,如果您单击输入,则会自动完成country
. 如果您更改country
为city
,您将获得 的自动完成功能city
。
这是一个最小的案例。如果您摆脱表格或摆脱输入,则行为消失。
<table>
<tr>
<td>country</td>
</tr>
<tr>
<td>
<input autocomplete="off">
<input autocomplete="off">
<input autocomplete="off">
</td>
</tr>
</table>
我正在运行 Chrome,版本 89.0.4389.82(官方构建)(64 位)(我刚刚升级到 89.0.4389.90,问题仍然存在。)
试试看:https ://codepen.io/timkay/pen/abBMGRE
解决方案
我找到了一个丑陋的解决方法:更改任何麻烦的单词,如country
, city
,address
等,以便浏览器无法识别它们。这是一个例子:
<div><span style="display: none;">x</span>country</div>
推荐阅读
- graphviz - 点:避免太水平的树
- amazon-s3 - 如何在 PySpark 中测试模拟(moto/boto)S3 读/写
- python - genfromtxt 仅在更改 dtype 后导入第一列
- httprequest - 在zuul过滤器中修改请求头
- automapper - 使用 LightInject 配置 AutoMapper
- java - 在 Junit 中使用 Vert.x 和 PowerMockito 时出现问题
- amazon-web-services - Cloudfront 被锁定在 index.html
- r - 将鼠标悬停在 Highcharter 图表的标题上。
- php - 在php wordpress插件开发中选择一个默认值
- imagemagick - 如何在 Electron 应用程序中安装和捆绑 GraphicsMagick?