开发者

Clearing form cache in html

I have a form where in the user goes and types a text in the text field. My problem is that when the user is visiting this page, the previous text that has been typed in that text box is being displayed. I donot want that to happen as that text is a sensitive issues. Can anyone provide me a solution for that.

I tried using this code in javascript to clear the form cache but of no use. I also tried clearing the browser;s cache but of no use. Please suggest. Thanks.

 [code]
 function clearForms()
 {
 var i;
 for (i = 0; (i < document.forms.length); i++) {
 document.forms[i].reset();
 }

 </scrip开发者_高级运维t>

 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 </head>

 <body onLoad="clearForms()" onUnload="clearForms()">


 [/code]

Also, attached is the image which you would help you in a better understanding of what I am saying.


Take a look to this question -> Make page to tell browser not to cache/preserve input values

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜