我怎样才能显示一个文本框的内容时,光标接触相关的标签吗? [英] How can I display a text box's content when the cursor touches the associated label?
本文介绍了我怎样才能显示一个文本框的内容时,光标接触相关的标签吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个标签和与其相关联的文本框。我已经添加在文本框中它是无形的,在第一部分的文字;我想显示后,标签上的光标移动的内容。
I have a label and a text box associated with it. I have added some text in the text box which is invisible at first; I want to display the content after the cursor moves on the label.
我怎样才能做到这一点?
How can I do this?
推荐答案
您可以使用的的onmouseover 和 的onmouseout < /在标签上STRONG>事件。如果你可以使用一个框架,像jQuery,您可以使用悬停功能。
You can use onmouseover and onmouseout event on the label. If you can use a framework like jQuery you can use the hover function.
见一个 工作演示
See a working demo.
这篇关于我怎样才能显示一个文本框的内容时,光标接触相关的标签吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文