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

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

问题描述

我对 Firefox 中保留用户在重新加载时填写的数据的功能有一个大问题F5.如果我使用 Ctrl+F5 表格会被清除,这很好.我的问题是,并非所有用户都知道这是他们必须执行的强制输入清理操作.有没有办法在 html 或响应头中告诉 Firefox 不要将数据保留在表单中?

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?

推荐答案

只需将 autocomplete="off" 添加到您的输入中即可解决问题.

Just add autocomplete="off" to your inputs and you will solve the problem.

<input type="text" autocomplete="off">

jQuery 在所有输入和文本区域上解决这个问题

jQuery to solve this on all inputs and textareas

$('input,textarea').attr('autocomplete', 'off');

这篇关于Firefox 在重新加载时保留表单数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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