//使用autocomplete="new-password"
<Input type='password'  autocomplete="new-password"/>

这是一个新属性,兼容所有浏览器.

注意:如果用react的jsx时要写autoComplete="new-password",区分属性大小写

 

方法二:

 <input type='password' readonly onfocus="this.removeAttribute('readonly');" />

 

相关文章:

  • 2022-01-22
  • 2021-12-19
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-12-08
  • 2022-12-23
猜你喜欢
  • 2021-11-16
  • 2021-12-19
  • 2021-12-03
  • 2022-02-11
  • 2022-01-26
  • 2021-06-19
相关资源
相似解决方案