Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html] 第69天 怎样禁止表单记住密码自动填充? #494

Open
haizhilin2013 opened this issue Jun 23, 2019 · 7 comments
Open

[html] 第69天 怎样禁止表单记住密码自动填充? #494

haizhilin2013 opened this issue Jun 23, 2019 · 7 comments
Labels
html html

Comments

@haizhilin2013
Copy link
Collaborator

第69天 怎样禁止表单记住密码自动填充?

@haizhilin2013 haizhilin2013 added the html html label Jun 23, 2019
@xiangshuo1992
Copy link
Contributor

同这道题有相关联:[css] 第27天 怎样修改chrome记住密码后自动填充表单的黄色背景?

autocomplete="off"

@haizhilin2013
Copy link
Collaborator Author

对的,是有点关联,但还是有些区别,第27天的题是修改自动填充的背景属于修改样式的范围。第69天的是禁止它自动填充。

@thisisandy
Copy link

一些浏览器并不align autocomplete, 可以额外 加一个透明的 password 和user name 的输入框。

@liuxiaole
Copy link

一些浏览器并不align autocomplete, 可以额外 加一个透明的 password 和user name 的输入框。

那样你就会得到如下的 console 警告:
[DOM] Multiple forms should be contained in their own form elements; break up complex forms into ones that represent a single action: (More info: https://goo.gl/9p2vKq)

@klren0312
Copy link

autocomplete = "new-password"

参考资料: https://developer.mozilla.org/zh-CN/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

@zhuyuedlut
Copy link

我试了下Chrome浏览器比较新的版本使用autocomplete设置已经不行,还是得用上面大神的方法增加input框,贴一个比较全的链接:
https://www.cnblogs.com/chenqingbin/p/11051192.html

@MrZ2019
Copy link

MrZ2019 commented Jan 12, 2021

同这道题有相关联:[css] 第27天 怎样修改chrome记住密码后自动填充表单的黄色背景?

autocomplete="off"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html html
Projects
None yet
Development

No branches or pull requests

7 participants