简体   繁体   English

标签,文本框,Asp.net

[英]Label,TextBox,Asp.net

I have a label and a text box associated to it . 我有一个标签和一个与之关联的文本框。 I have added some text in text box which is invisible at first... now I want to display the content after I go On the label... 我在文本框中添加了一些最初不可见的文本...现在我想在标签上显示内容...

If you are using an HTML label rather than an ASP label, you can use the onmouseover event. 如果使用的是HTML标签而不是ASP标签,则可以使用onmouseover事件。 From within this event, you can then turn on/off the visibility of the text. 然后,您可以在此事件中打开/关闭文本的可见性。

如果要在另一个文本框中输入内容后显示一个文本框,则可以使用javascript onBlur()事件显示它。

using jquery it can be: 使用jquery可以是:

$("#MyLabel").mouseover(function(){ $("#MyTextBox").attr("visible","true"); }); $(“#MyLabel”)。mouseover(function(){$(“#MyTextBox”)。attr(“ visible”,“ true”);});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM