Home  >  Article  >  Web Front-end  >  解决HTML表单的input的在F5刷新后依然存在记录的问题_html/css_WEB-ITnose

解决HTML表单的input的在F5刷新后依然存在记录的问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 08:49:041609browse

最初出现这种情况,我以为你缓存的问题,因为我在FireFox中F5刷新会有记录,但是ctrl+shift+r重新加载就不会有记录。

所以,在HTML页面添加了如下的:

<meta charset="utf-8"><br /><meta http-equiv="X-UA-Compatible" content="IE=edge"><br /><meta http-equiv="Content-Type" content="text/html;"><br /><meta http-equiv="X-UA-Compatible" content="IE=8"><br /><meta http-equiv="Expires" content="0"><br /><meta http-equiv="Pragma" content="no-cache"><br /><meta http-equiv="Cache-Control" content="no-cache"><br /><meta http-equiv="Cache" content="no-cache">

测试结果失败!


然后,在百度上找了一下,找到了autocomplete。

原来表单的 input 是默认autocomplete="on",即自动会记录上次操作。只需显示设置autocomplete="off"即可

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn