Javascript Pop-Up when Mouse Hovers toward Browser Bar/Back Button(鼠标悬停在浏览器栏/后退按钮上时弹出 Javascript)
问题描述
我想在这个页面上模仿这个确切的功能.(将鼠标移向顶部浏览器栏)
I would like to imitate this exact feature on this page. (Move mouse toward the top browser bar)
http://my-personal-growth.com/personal-growth/what-anthony-robbins-teaches-about-emotions-and-meaning
我想我只需要知道如何创建鼠标悬停动作,其余的我应该能够自己处理.
I guess all i need to know is how to create the hovering mouse action, the rest I should be able to handle myself.
有教程吗?我不懂js.
Any tutorials? I don't know js.
谢谢大家.
推荐答案
您可以使用 window.onmouseout 事件或在您正在使用的页面上的元素上使用 onmouseout.
You could use window.onmouseout event or use onmouseout on the elements on the page you are using.
类似这样的:
<html>
<head>
<title>onmouseout test</title>
<style type="text/css">
.my_box { border: 1px solid red; }
</style>
<script type="text/javascript">
window.onmouseout = mouseout;
function mouseout()
{
alert("mouseout event detected!");
}
</script>
</head>
<body>
<div class="my_box">
<p>move the mouse pointer away from the element it is on<br />
to fire the mouseout event.</p>
</div>
</body>
</html>
这篇关于鼠标悬停在浏览器栏/后退按钮上时弹出 Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:鼠标悬停在浏览器栏/后退按钮上时弹出 Javascript


- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 400或500级别的HTTP响应 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- Fetch API 如何获取响应体? 2022-01-01