小编典典

Chrome忽略autocomplete =“ off”

html

我创建了一个使用标签箱下拉菜单的Web应用程序。此功能在Chrome浏览器(版本21.0.1180.89)以外的所有浏览器中均适用。

尽管该input字段和form具有autocomplete="off"属性的字段均被保留,但Chrome仍坚持显示该字段先前条目的下拉历史记录,这使标记框列表消失了。


阅读 421

收藏
2020-05-14

共1个答案

小编典典

更新

Chrome现在似乎忽略了style="display: none;"style="visibility: hidden;属性。

您可以将其更改为:

<input style="opacity: 0;position: absolute;">
<input type="password" style="opacity: 0;position: absolute;">

根据我的经验,Chrome只会自动完成第一个<input type="password">和上一个<input>。因此,我添加了:

<input style="display:none">
<input type="password" style="display:none">

至此,<form>此案已解决。

2020-05-14