asp.net c中文本框失去焦点 [英] Lost Focus for textbox in asp.net c#

查看:144
本文介绍了asp.net c中文本框失去焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个文本框,我在其上检查文本更改的重复记录。

但我也希望文本框检查关于失去焦点的重复记录
asp.net中的
c#

我无法编写丢失焦点的代码或如何实现场景

帮我一些例子或伪代码

请帮助


I have a textbox on which i check duplicate record on text changed.
but i also want the textbox to check for duplicate records on lost focus
in asp.net c#
I am not able to write code for lost focus or how to implement the scenario
help me with some examples or pseudo code
Please Help

推荐答案

参考此链接



在文本框上调用Javascript失去焦点 [ ^ ]



那里,在Page_Load中添加了 OnBlur 事件。一旦TextBox失去焦点,就会调用javascript函数。你可以在这个函数中做你的东西。



问候..:)
Refer this link

Calling Javascript on Textbox loss of focus[^]

There,OnBlur event is added at Page_Load. Once the TextBox loses the focus,javascript function will be called. You can do your stuff in that function.

Regards..:)


在textbox的TextChanged事件上编写代码/>
write code on TextChanged event of textbox
protected void Textbox_TextChanged(object sender, EventArgs e)
        {
             code....
        }









在文本框的onBlur上写javascript



Or

write javascript on onBlur of textbox


这篇关于asp.net c中文本框失去焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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