【发布时间】:2017-10-02 16:40:20
【问题描述】:
我想禁用谷歌浏览器自动完成/自动填充/使用密码建议
类似于 autocomplete="off" 的东西(这个不起作用)。
代码如下
loginpage.php
<form class="form-method" method="post">
<span class="form-fill">
<text>Username</text>
<input placeholder="Username" required/>
<text>Password</text>
<input type="password" placeholder="Password" required/>
<button type="submit"></button>
</span>
</form>
anotherform.php
<form method="REQUEST" class="vp-method">
<input type="password" maxlength="4" autocomplete="JUST STOP!"/>
<button type="submit" placeholder="DVN Number">Validate</button>
</form>
如何在不使用 javascript 的情况下禁用此 google chrome 自动完成/建议/自动填充?
注意:我知道有重复的问题。而且这些建议都不起作用(正如我现在正在输入的那样)。
谢谢你:)
【问题讨论】:
-
试试 jQuery disableAutoFill 插件github.com/terrylinooo/jquery.disableAutoFill
-
<input type="text" name="whatever" autocomplete="off_<?php echo time() ?>">这将导致 Chrome 搜索“off_{time}”的输入历史......所以它永远不会找到任何内容,基本上禁用它。
标签: html google-chrome autocomplete autofill