流量变现70%分成 全国楼凤小姐姐 招商联系客服 招商联系客服 招商联系客服 招商联系客服

各种页面常用的弹窗代码大全-可设置同一IP弹出窗口次数和时间的弹窗代码

[复制链接]
查看146 | 回复0 | 2024-9-23 12:44:29 | 显示全部楼层 |阅读模式
可设置同一IP弹出窗口次数和时间的弹窗代码



  1. <script language=javascript src="/ads_36.js"></script>
复制代码

JS文件
复制内容到剪贴板
代码:
  1. function GetCookie (name) {<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  2. var arg = name + "=";<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  3. var alen = arg.length;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  4. var clen = documents.cookie.length;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  5. var i = 0;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  6. while (i < clen) {<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  7. var j = i + alen;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  8. if (documents.cookie.substring(i, j) == arg)<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  9. return getCookieval_r(j);<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  10. i = documents.cookie.indexOf(" ", i) + 1;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  11. if (i == 0) break;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  12. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  13. return null;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  14. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  15. function SetCookie (name, value) {<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  16. var argv = SetCookie.arguments;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  17. var argc = SetCookie.arguments.length;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  18. var expires = (argc > 2) ? argv[2] : null;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  19. var path = (argc > 3) ? argv[3] : null;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  20. var domain = (argc > 4) ? argv[4] : null;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  21. var secure = (argc > 5) ? argv[5] : false;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  22. documents.cookie = name + "=" + escape (value) +<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  23. ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  24. ((path == null) ? "" : ("; path=" + path)) +<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  25. ((domain == null) ? "" : ("; domain=" + domain)) +<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  26. ((secure == true) ? "; secure" : "");<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  27. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  28. function deleteCookie (name) {<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  29. var exp = new Date();<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  30. exp.setTime (exp.getTime() - 1);<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  31. // This cookie is history<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  32. var cval = 0;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  33. documents.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  34. }
复制代码

//设置cookies时间,自己根据情况设置。
  1. var expDays = 1;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  2. var exp = new Date();<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  3. exp.setTime(exp.getTime() + (expDays*1*10*60*1000));<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  4. function amt(){<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  5. var count;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  6. //var count = GetCookie('count'); //同一ip只显示一次<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  7. //var count;//同一ip只显示N次<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  8. //alert(count);<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  9. //count = null;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  10. if(count == null) {<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  11. SetCookie('count','1')<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  12. return 1<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  13. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  14. else{<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  15. var newcount = parseInt(count) + 1;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  16. if(newcount<2) count=1;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  17. SetCookie('count',newcount,exp);<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  18. //deleteCookie('count')<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  19. return newcount<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  20. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  21. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  22. function getCookieval_r(offset) {<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  23. var endstr = documents.cookie.indexOf (";", offset);<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  24. if (endstr == -1)<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  25. endstr = documents.cookie.length;<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  26. return (documents.cookie.substring(offset, endstr));<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  27. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  28. function openAds(){<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  29. var focusid=setTimeout("focus();var popAd=window.showModelessDialog('http://www.dongdong123','17286','dialogHeight:200;dialogWidth:200;scroll:1;status:1;help:1;resizable:1;');",1000);<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  30. self.focus();<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  31. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  32. if(amt()==1)<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  33. {<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  34. openAds()<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  35. }<wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;"><wbr style="margin-right: auto; margin-left: auto;">
  36. //-->
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则