html - 如何禁用 Web 表单字段/输入标签上的浏览器自动完成功能?

标签 html forms browser autocomplete

如何在主要浏览器中禁用特定输入(或表单域)的自动完成功能?

最佳答案

Firefox 30 忽略密码的 autocomplete="off",而是选择提示用户密码是否应该存储在客户端上。注意以下commentary从 2014 年 5 月 5 日开始:

  • 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.

根据Mozilla Developer Network文档中, bool 表单元素属性 autocomplete 防止表单数据被缓存在旧浏览器中。

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

关于html - 如何禁用 Web 表单字段/输入标签上的浏览器自动完成功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58077563/

相关文章:

javascript - 如何在 JQuery 中迭代循环以在 HTML 中添加动态元素

jquery - 如何使用jquery检查当前表单中的所有复选框?

jquery - 使用 jQuery 检测表单更改上的特定字段 ID

JavaScript 文档.域 : Chrome and Firefox return different

html - 实现响应式字体大小的简单方法

html - 如何使用 CSS flexbox 架构设置文本组件的样式?

html - 更改CSS中表类中所有td的颜色

javascript - 值未显示,即使它位于 HTML 中

html - 为什么 `</html>`之后的内容会出现在浏览器中?

C# Web 浏览器控件 : Navigating to a List to URLs