Firefox保持重新加载表单数据 [英] Firefox keeps form data on reload

查看:285
本文介绍了Firefox保持重新加载表单数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆