不讓瀏覽器緩存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-2026 CODEPRJ.COM