如何关闭 html 输入的浏览器建议

How do you turn off browser suggestions on html input

如何关闭 html 输入时的浏览器建议?

只需在您的输入中使用 autocomplete

autocomplete="off"

类似于:

<input type="text" autocomplete="off">

您随时可以在需要时切换回 autocomplete="on"

<input type="text" class="form-control" autocomplete="off" />

根据 Mozilla 开发人员文档,表单元素属性自动完成可防止表单数据在旧版浏览器中缓存。

<input type="text" name="foo" autocomplete="off" />

The password manager always prompts if it wants to save a password. Passwords are not saved without permission from the user.

We are the third browser to implement this change, after IE and Chrome.