Home  >  Article  >  Web Front-end  >  html禁止清除input文本输入缓存_html/css_WEB-ITnose

html禁止清除input文本输入缓存_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:54:431174browse

多数浏览器默认会缓存input的值,只有使用ctl+F5强制刷新的才可以清除缓存记录。

如果不想让浏览器缓存input的值,有2种方法:

方法一: 
在不想使用缓存的input中添加 autocomplete="off"; 
eg:

方法二: 
在 input 所在的form标签中添加 autocomplete="off"; 
eg:



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