网站关闭优惠 PHP/Javascript

发布于 2024-12-10 00:06:34 字数 568 浏览 0 评论 0原文

我不知道我们对这种方法到底说什么。

有时我们访问存储或托管服务提供商。当我们尝试关闭选项卡或窗口时,它会向我们显示消息。

回复消息

并重定向到另一个页面,我们在其中可以看到优惠/折扣等。

我该怎么做?

编辑: 这是您可以观看现场演示的链接 https://secure.ipower.com/register/registration.bml 或主页http://ipower.com

但我不知道如何使用它...

谢谢,

I don't what exactly we say about this method..

Some time we visit to store or hosting service provider.. and when we are try to close a tab or windows its show us message..

Reply Message

and redirect to another page where we can see the offers/discount etc.

How could i do that?

EDIT:
Here is the link where you could see live demonstration
https://secure.ipower.com/register/registration.bml or home page of http://ipower.com

But i don't know how to use it...

Thanks,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦途 2024-12-17 00:06:34

首先在 Google 上点击“确认离开网页”:

http://www.openjs.com/scripts/events/exit_confirmation.php< /a>


function goodbye(e) {
    if(!e) e = window.event;
    //e.cancelBubble is supported by IE - this will kill the bubbling process.
    e.cancelBubble = true;
    e.returnValue = 'You sure you want to leave?'; //This is displayed on the dialog

    //e.stopPropagation works in Firefox.
    if (e.stopPropagation) {
        e.stopPropagation();
        e.preventDefault();
    }
}
window.onbeforeunload=goodbye;

First hit on Google on "confirm leave web page":

http://www.openjs.com/scripts/events/exit_confirmation.php

function goodbye(e) {
    if(!e) e = window.event;
    //e.cancelBubble is supported by IE - this will kill the bubbling process.
    e.cancelBubble = true;
    e.returnValue = 'You sure you want to leave?'; //This is displayed on the dialog

    //e.stopPropagation works in Firefox.
    if (e.stopPropagation) {
        e.stopPropagation();
        e.preventDefault();
    }
}
window.onbeforeunload=goodbye;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文