简体   繁体   English

当鼠标悬停在浏览器栏/后退按钮上时,JavaScript弹出

[英]Javascript Pop-Up when Mouse Hovers toward Browser Bar/Back Button

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 http://my-personal-growth.com/personal-growth/what-anthony-robbins-teaches-about-emotions-and-含义

I guess all i need to know is how to create the hovering mouse action, the rest I should be able to handle myself. 我想我只需要知道如何创建鼠标悬停的动作,其余的我就应该能够处理好自己。

Any tutorials? 有教程吗? I don't know js. 我不懂js。

Thanks Everyone. 感谢大家。

You might notice the wee little text at the bottom of the ( f&!ing ) popup: 您可能会注意到( f&!ing )弹出窗口底部的小文本:

Powered by ActionPopup 由ActionPopup提供支持

That's how it's done. 就是这样做的。

Don't do it. 不要这样

(And don't you just love the voice that starts talking at you when you open the ActionPopup page?) (难道您不只是喜欢在打开ActionPopup页面时开始对您说话的声音吗?)

You could use window.onmouseout event or use onmouseout on the elements on the page you are using. 您可以在使用的页面上的元素上使用window.onmouseout事件或使用onmouseout。

Something like this: 像这样:

<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>

As Matt Ball said, it's made by ActionPopup . 正如Matt Ball所说,它是由ActionPopup制造的。

If you want to see how it's done, you can have a look at the code here : 如果您想知道它是如何完成的,可以在这里查看代码:

http://my-personal-growth.com/wp-content/plugins/action-popup/actionpopup.php http://my-personal-growth.com/wp-content/plugins/action-popup/actionpopup.php

(not sure why it has a php extension...) (不知道为什么会有php扩展名...)

But as the others said, it is a very annoying function. 但是,正如其他人所说,这是一个非常令人讨厌的功能。 I can't really see how it would ever be useful. 我真的看不出来它怎么会有用。

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

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