如何清除文本框中的缓存 [英] how to clear the cache in textbox

查看:224
本文介绍了如何清除文本框中的缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想知道,如果我们在文本框中键入内容,该内容会像弹出菜单一样保留在那里.我想在每次页面加载事件发生时将其清除.
我该怎么办?
有人帮助我..


i want to know,if we type something in a textbox, that remains there itself as like pop down menu.i want to clear it each time the page load event takes place.
what shall i do for this??
someone help me..

推荐答案

关闭该文本框的autocomplete.

方法1
Turn off the autocomplete for that textbox.

Way 1
<asp:textbox id="TextBox1" autocomplete="off" runat="server" textmode="Password" xmlns:asp="#unknown"></asp:textbox>


方法2


Way 2

document.getElementById('txtPassword').setAttribute('autocomplete','off');


禁用IE/Firefox记住密码吗? [


Disable IE/Firefox remember password ?[^]


很好地创建存储此文本的存储(会话对象/视图状态变量).
Well create the store (session object/viewstate variable) where this text is being stored.


这篇关于如何清除文本框中的缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆