如何知道if条件下的textchanged事件 [英] how to know the textchanged event in if condition
本文介绍了如何知道if条件下的textchanged事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何知道文本框中文本的天气是否已经改变?使用if条件
不使用textchanged事件...
请帮助我........
在此先感谢........
hi ,
How can I know weather the text in the textbox has changed or not ?using an if condition
not with the textchanged event...
Please Help Me........
Thanks In Advance........
推荐答案
您的问题不明确,是否要使用javascript或codebehind检查?
请查看以下链接...
http://asp-net-example.blogspot.in/2009/03 /how-to-use-ontextchanged-event-in.html [ ^ ]
如果要在文本更改时触发textchanged以外的事件在文本框中,然后这样做
If you want to fire an event other than textchanged when the text is changed in the textbox , then do like this
<asp:textbox runat="server" id="tb1" xmlns:asp="#unknown"></asp:textbox>
将onblur事件添加到后面的代码中的文本框中
Add onblur event to the textbox in code behind like this
tb1.Attributes.Add("onblur", "javascript:tbFn(this);");
function tbFn(tb) {
var text = tb.value;
}
其中变量文本包含输入的值。
如果你想比较它以前的值,将它存储在一些会话中并比较值。
希望这有帮助......
where the variable text contains the entered value.
If you want to compare with its previous values, store it in some session and compare the values.
Hope this helps...
这篇关于如何知道if条件下的textchanged事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文