不让浏览器缓存input的值


方法一: 
在不想使用缓存的input中添加 autocomplete="off"
eg: <input type="text" autocomplete="off" name="test" />

方法二: 
在 input 所在的form标签中添加 autocomplete="off"; 
eg:
<form action="#" autocomplete="off">
<input type="text" autocomplete="off" name="test" />
</form>

方法三  不让页面读取缓存数据

<meta   http-equiv= "Pragma"   content= "no-cache" /> 
<meta   http-equiv= "Cache-Control"   content= "no-cache" /> 
<meta   http-equiv= "Expires"   content= "0" /> 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM