当鼠标光标输入文本框中时,如何填充消息框? [英] How can I populate a message box when mouse cursor enters in a text box?

查看:110
本文介绍了当鼠标光标输入文本框中时,如何填充消息框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在使用3个文本框.当我单击第二个文本框时,我想在消息框中显示第一个文本框的值(如果第一个文本框通过了验证).
单击第三个文本框时的步骤相同,我想在消息框中显示第一个文本框值和第二个文本框值(如果第一个文本框,第二个文本框通过了验证).




问候,
NSJ

Hi All,


I am using 3 text boxes. When I click on 2nd text box I want to show 1st text box value in message box (if 1st text box passed the validations).
Same procedure when i click on 3rd textbox I want to show 1st text box value and 2nd text box value in message box(if 1st text box,2nd text box passed the validations).




Regards,
NSJ

推荐答案

处理TextBox.Click事件.
在处理程序中,验证文本框1的内容,并适当显示您的消息.
Handle the TextBox.Click event.
In the handler, validate the content of text box 1, and show your message as appropriate.


对文本框的onblur事件进行编码

为此,您将必须单击一个按钮,并在表单加载事件中将其显示为false.
我正在根据您的要求给您使用代码.

Do coding on onblur event of textbox

for that u will have to take a button and make its visible false on form load event.
i m giving u code use as per your requirement.

protected void Page_Load(object sender, EventArgs e)
 {
     Button3.Visible = false;
     string hanlder1 = ClientScript.GetPostBackEventReference(this.Button3, "");
     Textbox2.Attributes.Add("onblur", hanlder1);
 }


服务不可用




同样的事情适用于第三个TextBox并使用另一个按钮


Service Unavailable




Same thing apply for third TextBox and use one more button


这篇关于当鼠标光标输入文本框中时,如何填充消息框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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