解决Firefox中刷新页面, 不重置输入的值

https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

在form加autocomplete="off"或者给各个input加autocomplete="off", 

注:不要用JQuery设置$("form").attr("AUTOCOMPLETE","off");



<form method="post" action="/form" autocomplete="off">
[…]
</form>
<form method="post" action="/form">
  […]
  <div>
    <label for="cc">Credit card:</label>
    <input type="text" id="cc" name="cc" autocomplete="off">
  </div>
</form>

你可能感兴趣的:(解决Firefox中刷新页面, 不重置输入的值)