Firefox保持重新加载表单数据 [英] Firefox keeps form data on reload
问题描述
我在Firefox中的功能方面存在一个很大的问题,那就是用户在重新加载 F5 时填入的数据。如果我使用 Ctrl + F5 ,表格将被清除,这很好。我的问题是,并不是所有的用户都知道这是他们必须做的强制输入清理。有没有一种方法在HTML或响应头告诉Firefox不保存在表单中的数据?
code> autocomplete =off给你所有的输入,你将解决这个问题。
< input type =textautocomplete =off>
jQuery在所有输入和textareas上解决这个问题
$('input,textarea')。attr('autocomplete','off');
I have a big problem with the functionality in Firefox that keeps data that the user have filled in on reload F5. If i use Ctrl+F5 the forms are cleared and this is great. My problem is that not all my users know that this is what they have to do to force the input cleanup. Is there a way in the html or response headers to tell Firefox to not keep the data in the forms?
Just add autocomplete="off"
to all you input and you will solve the problem.
<input type="text" autocomplete="off">
jQuery to solve this on all inputs and textareas
$('input,textarea').attr('autocomplete', 'off');
这篇关于Firefox保持重新加载表单数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!