注册账号时,密码表单使浏览器提示建议的密码(现代主流浏览器 Chrome、Safari、Firefox 支持) 作者: Chuwen 时间: 2021-10-12 分类: HTML5 ## 序言 常看到一些网站注册账号时,在密码表单浏览器会提示“建议安全系数高的密码”   Google 上查阅了很多相关的资料,最终找到了相关用法: - https://www.chromium.org/developers/design-documents/form-styles-that-chromium-understands - https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes/autocomplete - https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input#attr-autocomplete 主要靠的是 `autocomplete` 属性来实现  ## 代码 > 请注意,必须使用 `http`/`https` 协议预览才有效果 ```html ``` 标签: Chrome