社区应用 最新帖子 精华区 社区服务 会员列表 统计排行 邀请注册 银行
主题 : 拦截不了的超强弹窗,淘宝弹窗~!
loco 离线
级别: 管理员

显示用户信息 
楼主  发表于: 2009-11-06   

拦截不了的超强弹窗,淘宝弹窗~!

管理提醒: 本帖被 loco 从 自由软件 移动到本区(2010-01-20)
复制代码
  1. <script type="text/javascript">
  2. //牧狼者
  3. function GetCookie(sName)
  4. {
  5.         var aCookie = document.cookie.split("; ");
  6.         for (var i=0; i < aCookie.length; i++)
  7.         {
  8.                 var aCrumb = aCookie[i].split("=");
  9.                 if (sName == aCrumb[0])
  10.                 return unescape(aCrumb[1]);
  11.         }
  12.         return null;
  13. }
  14. function SetCookie(sName, sValue,date)
  15. {
  16.         document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString()+";domain=www.uke360.com;path=/";
  17. }
  18. banner4_iframe=null;
  19. date = new Date();
  20. date.setDate(date.getDate()+1);
  21. if(GetCookie("banner4_ifrv")==null){
  22. SetCookie("banner4_ifrv","0",date);        
  23. }
  24. if(GetCookie("banner4_ifrv")=="0"){
  25. //banner4_ifrv=0;
  26. banner4_iframe=window.open('http://bbs.59xm.com','_blank');
  27. if(banner4_iframe!=null)SetCookie("banner4_ifrv","1",date);
  28. }
  29. </script>
  30. </head>
  31. <body onclick="if(banner4_iframe==null&&GetCookie('banner4_ifrv')=='0')banner4_iframe=window.open('http://bbs.59xm.com','_blank');if(banner4_iframe!=null)SetCookie('banner4_ifrv','1',date);">



淘宝网的弹窗代码:

复制代码
  1. $E.on(window, 'load', function() {
  2. if (TB.bom.getCookie('_tb_defaultbackpop_') == 1) return;
  3. var saveStatus = function() {
  4.        var nowDate = new Date();
  5.        var nowTime = nowDate.getHours()*3600 + nowDate.getMinutes()*60 + nowDate.getSeconds();
  6.        var DAY = 24*3600;
  7.        var leaveTime = DAY - nowTime;
  8. TB.bom.setCookie('_tb_defaultbackpop_', 1, leaveTime/DAY, document.domain, '/');
  9. }
  10. var createPopup = function() {
  11.        var adPopup = window.open('about:blank','_backad','width='+(pw||760)+',height='+(ph||480)+',toolbar=no,location=no,directories=no,status=yes,resizable=no,scrollbars=no');
  12. adPopup.blur();
  13. adPopup.opener.focus();
  14. adPopup.location = adUrl;
  15. }
  16. var popAd = function() {
  17.        try {
  18.          createPopup();
  19.        } catch (e) {
  20.          $E.on(document, 'click', popAd2);
  21.        } finally {
  22. saveStatus();
  23. }
  24. }
  25. var popAd2 = function() {
  26.        $E.removeListener(document, 'click', arguments.callee);
  27.        try {
  28.          createPopup();
  29.        } catch (e) {}
  30. saveStatus();
  31. }
  32. var adUrl = 'http://www.taobao.com/promotion/defaultbackpop.html';
  33. var pw = '760', ph = '480';
  34. setTimeout(popAd, 2000);
  35. });
别人笑我太疯癫,我笑别人看不穿!切忌太过认真...
描述
快速回复

按"Ctrl+Enter"直接提交