文字框onfocusout事件 [英] Textbox onfocusout event

查看:67
本文介绍了文字框onfocusout事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在服务器端的asp.net Web应用程序中触发文本框焦点事件

How i can fire text box focus out event in asp.net web application at server side

推荐答案

您要触发或捕获事件?
顺便说一句,如果有帮助,它是onblur.

Google [ http://stackoverflow.com/questions/3863927/lost-focus-method- for-asp-net-textbox [ ^ ]
You want to fire or catch event?
By the way it is onblur, if it helps.

Google[^] to know how to catch it on serverside.
http://stackoverflow.com/questions/3863927/lost-focus-method-for-asp-net-textbox[^]


尝试此链接.

http://stackoverflow.com/questions/3863927/lost-focus-method- for-asp-net-textbox [ ^ ]
Try this link.

http://stackoverflow.com/questions/3863927/lost-focus-method-for-asp-net-textbox[^]



我们可以使用javascript进行相同操作,请尝试使用javascript.

我们可以使用__doPostBack函数将控制权从客户端更改为服务器端.

我们可以使用dopostback函数将参数传递给服务器端.
它在服务器端导致回发,在服务器端接受该参数,并根据条件进行绑定

在javascipt函数中
__doPostBack(''onfocusout'');


在页面加载中

字符串strText = System.Web.HttpContext.Current.Request.Params.Get("__ EVENTTARGET");
如果(strText.Equals("onfocusout"))
{
在这里做你的代码..........绑定..........
}


问候,
shefeek
Hi,
We can do the same by using javascript,please try it using javascript.

we can change control from the client side to server side using __doPostBack function.

we can pass argument to the server side using dopostback function.
it causes postback in the server side ,accept that argument in server side and and do ur binding according with condition

in javascipt function
__doPostBack(''onfocusout'');


in pageload

string strText = System.Web.HttpContext.Current.Request.Params.Get("__EVENTTARGET");
if (strText.Equals("onfocusout"))
{
do your code here..........binding......................
}


regards ,
shefeek


这篇关于文字框onfocusout事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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