开发者

How can I display a text box's content when the cursor touches the associated label?

开发者 https://www.devze.com 2022-12-24 06:26 出处:网络
I have a label and a text box associated with it. I have added some text in the text bo开发者_Python百科x which is invisible at first; I want to display the content after the cursor moves on the label

I have a label and a text box associated with it. I have added some text in the text bo开发者_Python百科x which is invisible at first; I want to display the content after the cursor moves on the label.

How can I do this?


This is to handle on mouse move in client side javascript.

Use label onmousemove event to trap the event, and set textbox visibility to true. [You can easily write the code for yourself]


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号