使用javascript在mouseover和mouseout事件上弹出窗口 [英] popup window dispaly on mouseover and mouseout event using javascript

查看:117
本文介绍了使用javascript在mouseover和mouseout事件上弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在mouseover和mouseout事件发生时显示弹出窗口.

i want display popup window on mouseover and mouseout event

推荐答案

您几乎没有花力气发布您想做的事情! :doh:

请具体说明并从下一次正确提出您的问题.
现在,这里有一个示例,可以让您了解如何实现它,并在需要使用的地方使用相同的逻辑:
1.将Javascript函数插入鼠标悬停&将鼠标移出网格行中的链接.
2.使用JavaScript,当您将鼠标悬停在该行上时,显示一个包含所需详细信息的div(此处为图片)
3.使用JavaScript隐藏div onmouseout.

要从服务器端将JS注入到控件中,请执行以下操作:
You have hardly put an effort in posting what you are trying to do! :doh:

Please be specific and formulate your question properly from next time.
For now, here is a sample that would give you an idea of how to implement it, use the same logic where ever you want to:
1. Inject Javascript function on mousehover & mouseout of the link in a grid row.
2. Using JavaScript, show a div that contains the needed details(image here) when you hover your mouseover that row
3. Using JavaScript, hide the div onmouseout.

For injecting JS to a control from server side, do something like:
// Show div
myTextbox.Style.Attributes.Add("onmouseover", "ShowDiv(this);");

//Hide div
myTextbox.Style..Attributes.Add("onmouseover", "HideDiv(this);");



试试吧!



Try!


这篇关于使用javascript在mouseover和mouseout事件上弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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