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

WBOY
Release: 2016-06-21 08:49:04
Original
1607 people have browsed it

最初出现这种情况,我以为你缓存的问题,因为我在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">
Copy after login

测试结果失败!


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

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template