[英]How to block Chrome from auto-filling text boxes?
I'm testing my website on Google Chrome and saw that this browser always auto-fills my username and password text boxes, even if I never said to do that. 我正在Google Chrome上测试我的网站,发现该浏览器始终自动填充我的用户名和密码文本框,即使我从未说过这样做。 I don't want this behavior. 我不要这种行为。 Is there any way to stop this using PHP, CSS or JavaScript? 有什么方法可以使用PHP,CSS或JavaScript阻止这种情况?
您可以在不希望自动填写的字段上指定autocomplete="off"
,但必须遵守浏览器的要求,并且并非所有地方都支持:
<input type="text" name="something" autocomplete="off" />
不,这是浏览器功能,您应该可以将其关闭。
You can set 你可以设定
<form name="form1" autocomplete="off" action=""></form>
This applies for all form elements 这适用于所有表单元素
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.