简体   繁体   English

自动完成功能不会关闭吗? HTML文本框/密码字段

[英]Auto complete won't turn off? HTML Textbox/ Password fields

I'm trying to make it so the forms on my login/ registration pages won't preload data already entered. 我正在尝试这样做,因此登录/注册页面上的表单不会预加载已经输入的数据。 I've tried using autocomplete although some research on here tells me that this is ignored by Chrome? 我尝试使用自动填充功能,尽管此处的一些研究告诉我Chrome忽略了此功能? So I was wondering how else I can get around this issue? 所以我想知道我还能如何解决这个问题?

Code: 码:

<h3>USERNAME:</h3>
<input type='textbox' autocomplete='off' name='usernamereg' value='<?php     echo $_POST['usernamereg'] ?>'>

I want the bottom 2 fields to not have the pre-entered information: 我希望底部的2个字段没有预先输入的信息:

Screenshot 屏幕截图

Any help appreciated! 任何帮助表示赞赏!

For some weird reason, Google Chrome seems to ignore autocomplete rules in forms. 由于某些奇怪的原因,Chrome浏览器似乎忽略了表单中的自动完成规则。 Google Chrome also seems to only autofill the first occurrence of a username / password field. Google Chrome浏览器似乎也只能自动填充首次出现的username / password字段。 Try the following for the password field: 尝试以下操作作为密码字段:

<input type="text" style="display:none!important">
<input type="text" autocomplete="null" name="usernamereg" value="<?php echo $_POST['usernamereg'] ?>">

<input type="password" style="display:none!important">
<input type="password" autocomplete="null" name="whatevername" value="<?php echo $yourvariable ?>">

You have saved username and password in you browser. 您已在浏览器中保存了用户名和密码。 So It fill fetch from the browser autocomplete. 因此,它填充了从浏览器自动完成获取的功能。 If you clear cache and saved password. 如果清除缓存并保存密码。 It wont come... I face this same issue... After clearing those things. 不会...我面临同样的问题...清除这些东西后。 It works fine... Hope it work for you too... 效果很好...希望它也对您有用...

write autocomplete="off" in your form tag 在表单标签中写入autocomplete =“ off”

<form method="" action="" autocomplete="off" > 
</form>

Hope this will work 希望这会起作用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM