This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 请教Javascript高手:如果想让浏览者在离开本网站的时候最后弹出个popup,而在本网站各网页中浏览时不用弹出,用什么javascript的方法或者别的什么技术解决呢?多谢指教!
-swanson(swanson);
2002-8-27
(#716609@0)
-
这是什么需求?如果浏览者在地址栏直接敲新地址,你不可能截获任何东西,然后产生动作吧。
-bingle(bingle);
2002-8-27
(#716692@0)
-
某些POPUP爱好者客户的爱好,唉!没办法,但好象有的网站有这个功能,据说用ASP的SESSION也许能解决?但服务器是UNIX?有什么办法吗?在地址栏里输入真的截获不到啦?
-swanson(swanson);
2002-8-28
(#717015@0)
-
easy.. 1- when user colse the broser, if you want to pop a new window, u can put a applet int he page and use the destroy event to call back a javascript object which can pop up a new window...2- or if you already put a close button there you canput the logic in the exit code.
-bigdesk(nothing);
2002-8-28
{84}
(#716964@0)
-
As bingle mentioned, it depends on how you define "leave the site", close the browser or just go to different site? and how to go there, click the link or type the url...
-jkmazy(大闸蟹㊣蜗居候仙);
2002-8-28
(#716974@0)
-
离开,应该指的就是当前浏览器访问的页面的domain不是我的domain,或者当前浏览器被关闭。
-swanson(swanson);
2002-8-28
(#717019@0)
-
多谢各位,终于找到了个解决办法,因为找到了个用这个方法的网站:http://www.anfyteam.com/ 这页就是,但要在每个link上加一个 onclick="g=1",这样如果他还在我网站混,就一定要点击我的连接,这样就把javascript里用的变量设成1,然后就不弹出,如果他走人或者关闭,变量都不是1,那我就弹出。
thanks anyway :)
-swanson(swanson);
2002-8-28
{160}
(#717058@0)
-
笨方法有时就是好方法,只要能干活 :-)
-cnyouyou(游啊游,游到外婆桥);
2002-8-29
(#719015@0)
-
Try onUnload event. For example, <BODY onUnload="...">
-teddybear(新好男人);
2002-8-28
(#718055@0)
-
That's for every event when leave the page, not the website (same domain). But I have solved. thanks anyway. like here
-swanson(swanson);
2002-8-28
(#718706@0)
-
Sorry, I misunderstood you.
-teddybear(新好男人);
2002-8-29
(#719911@0)