我需要帮忙。我有下一个表单
<form action="" method="POST">
<input type="email" name="email">
<input type="email" name="email-repeat">
<input type="password" name="password">
<input type="password" name="password-repeat">
<input type="submit" value="">
</form>
和我想当我重新加载到页面,浏览器自动完成所有字段从保存的数据在浏览器(电子邮件和密码)两次密码和两次电子邮件。我尝试了一些与自动完成属性的组合,但没有。
您应该添加autocomplete="off"对于不希望自动填充的输入
<input autocomplete="off" type="email" name="email">
<input autocomplete="off" type="email" name="email-repeat">
<input autocomplete="off" type="password" name="password">
<input autocomplete="off" type="password" name="password-repeat">
<input type="submit" value="">
您可以在MDN中找到详细信息