【问题标题】:how to disable save password prompt in chrome [duplicate]如何在chrome中禁用保存密码提示[重复]
【发布时间】:2015-10-26 08:03:07
【问题描述】:

我已经搜索了几个小时来解决这个问题,但没有找到任何合适的解决方案,问题是每次我保存表单值时我的页面上都有三个输入表单,它要求我保存密码chrome 如何使用 JavaScript 或查询解决此问题

 <input type="password"  autocomplete="off"/>

我尝试过autocomplete='off',但它不起作用

【问题讨论】:

标签: javascript jquery google-chrome forms


【解决方案1】:

最好的方法是将您的密码类型更改为文本,然后用星号或圆点替换您喜欢的字符。

change <input type="password" /> to <input type="text" id="password" style="-webkit-text-security: disc;"/>

还有其他选择:

input { -webkit-text-security: none; }
input { -webkit-text-security: circle; }
input { -webkit-text-security: square; }
input { -webkit-text-security: disc; /* Default */ }

【讨论】:

    【解决方案2】:

    autocomplete="off" 是正确的代码,但许多浏览器不想支持它。他们想让用户选择而不是代码本身。所以你可以写,但是浏览器可以选择不读。

    【讨论】:

      猜你喜欢
      • 2014-05-31
      • 2015-12-22
      • 2020-11-21
      • 2015-03-30
      • 1970-01-01
      • 2023-01-27
      • 2022-11-30
      • 2014-06-04
      • 2020-11-21
      相关资源
      最近更新 更多