我有一个如下的登录表单:
<form name="checkform" action="example.php">
<input type="text" id="c_email" name="c_email" placeholder="EMail here">
<input type="text" id="c_epass" name="c_epass" placeholder="Password here">
<input type="submit" id="c_sub">
</form>
现在,当我使用此表单登录,然后浏览器要求保存密码。我点击了"是",这些都保存在浏览器中。但我不想每次打开页面登录时都自动填充这些详细信息。
如何限制不自动填充这些详细信息?我希望,如果用户填写了电子邮件id,那么只有保存的密码才能填充,否则这些字段应该保持为空。
<form name="checkform" action="example.php" autocomplete='off'>
<input type="text" id="c_email" name="c_email" placeholder="EMail here">
<input type="text" id="c_epass" name="c_epass" placeholder="Password here">
<input type="submit" id="c_sub">
</form>
在输入框中使用autocomplete="off"
:
<form name="checkform" action="example.php" autocomplete="off">
<input type="text" id="c_email" name="c_email" placeholder="EMail here">
<input type="text" id="c_epass" name="c_epass" placeholder="Password here">
<input type="submit" id="c_sub">
</form>
参考资料在这里。