Firefox推广提高收入的方法

[复制链接]
查看: 1666   回复: 9
发表于 2007-7-22 09:56:01 | 显示全部楼层 |阅读模式
效果演示:
http://www.adsensetips.com.cn   顶部,浏览应该没问题!

打开后,在浏览器顶部会有一个模仿IE自带的黄色警告条,比较醒目。
点过以后就不会再出现了,除非客户端删除cookie。


After opening at the top of the browser will have a built-in IE imitation yellow warning, more eye-catching. After the on-off point will not happen again, unless the client to delete cookie.

以下是FIREFOX.JS的代码


  1. // This function does the actual browser detection
  2. function writeCookie(name, value, hours)
  3. {
  4. var expire = “”;
  5. if(hours != null)
  6. {
  7.   expire = new Date((new Date()).getTime() + hours * 3600000);
  8.   expire = “; expires=” + expire.toGMTString();
  9. }
  10. document.cookie = name + “=” + escape(value) + expire;
  11. }
  12. // Example:
  13. // alert( readCookie(”myCookie”) );
  14. function readCookie(name)
  15. {
  16. var cookieValue = “”;
  17. var search = name + “=”;
  18. if(document.cookie.length > 0)
  19. {
  20.   offset = document.cookie.indexOf(search);
  21.   if (offset != -1)
  22.   {
  23.    offset += search.length;
  24.    end = document.cookie.indexOf(”;”, offset);
  25.    if (end == -1) end = document.cookie.length;
  26.    cookieValue = unescape(document.cookie.substring(offset, end))
  27.   }
  28. }
  29. return cookieValue;
  30. }
  31. function hasIE_hasIE() {
  32.   var ua = navigator.userAgent.toLowerCase();
  33.   return ((ua.indexOf(’msie’) != -1) && (ua.indexOf(’opera’) == -1) &&
  34.           (ua.indexOf(’webtv’) == -1) &&
  35.           (location.href.indexOf(’seenIEPage’) == -1));
  36. }
  37. function hasIE_showLayer(whichLayer)
  38. {
  39.   if (document.getElementById)
  40.     {
  41.       var style2 = document.getElementById(whichLayer).style;
  42.       style2.display = “block”;
  43.     }
  44.   else if (document.all)
  45.     {
  46.       var style2 = document.all[whichLayer].style;
  47.       style2.display = “block”;
  48.     }
  49.   else if (document.layers)
  50.     {
  51.       var style2 = document.layers[whichLayer].style;
  52.       style2.display = “block”;
  53.     }
  54. }
  55. // Hides and shows sections of the page based on whether or not it’s
  56. // running in IE
  57. function hasIE_hideAndShow()
  58. {
  59.   if (hasIE_hasIE())
  60.   {
  61.     hasIE_showLayer(”hasIE_level1″);
  62.   }
  63.   else{}
  64. }
  65. function hasIE_ContinueWithoutFF() {
  66.     if (location.href.indexOf(’?') != -1)
  67.         location.href += ‘&seenIEPage=1′;
  68.     else
  69.         location.href += ‘?seenIEPage=1′;
  70. }
  71. function closediv(i) {
  72. writeCookie(”status”,”showed24″,240);
  73. document.getElementById(i).style.display=’none’;
  74. }
  75. document.write(”<table id=\”hasIE_level1\” style=’display:none;clear:both;line-height:100%;’ height=\”22\” width=\”100%\” cellspacing=0 cellpadding=0 border=0><tr><td><div  style=\”background:#FFFFBB; text-align: center; padding:2px 0 3px; border-bottom:1px solid #ffd532;position:absolute; top:0; left:0; width:100%; z-index:100\”><div id=\”iewarning\” style=\”width:19px; float:left;\”><img align=\”absmiddle\” src=\”http://www.adsensetips.com.cn/ad/Firefox/warning.gif\” border=\”0\” /></div><div id=\”closeimg\” style=\”width:19px; float:right;\”><a href=\”javascript:closediv(’hasIE_level1′);\” title=\”关闭提示\”><img src=\”http://www.adsensetips.com.cn/ad/Firefox/close1.gif\” align=\”absmiddle\” border=\”0\” /></a></div><div style=\” margin-top:4px;marign-left:4px;font-size:12px;color:#092E20\”>Found that you are using old bugbear, the IE browser, strongly recommend you the Windows operating system using the most secure browser: <a href=\”http://www.gypop.com/english\” title=\”Download FireFox2.0\” target=\”_blank\”><font color=\”#ee0000\”>Download FireFox2.0</a></font></div></div><div style=\”clear:both\”></div></td></tr></table>”);
  76. if(document.referrer.indexOf(”hao123″)==-1 && document.referrer.indexOf(”hao222″)==-1)
  77. {
  78. if(readCookie(”status”) != “showed24″)
  79. {
  80.   hasIE_hideAndShow();
  81. }
  82. }
复制代码


在页面插入就是了 <script src='路径/firefox.js' language='javascript'></script>

Packaging Download Address : http://www.adsensetips.com.cn/ad/firefox.rar

效果演示:
http://www.adsensetips.com.cn
发表于 2007-7-22 10:34:50 | 显示全部楼层
最好还能随着网页下拉一直附着着顶部
回复 支持 反对

使用道具 举报

发表于 2007-7-22 10:35:58 | 显示全部楼层
收下了,谢谢。
回复 支持 反对

使用道具 举报

发表于 2007-7-22 12:11:37 | 显示全部楼层
郁闷啊.我还是不懂
回复 支持 反对

使用道具 举报

发表于 2007-7-22 12:24:51 | 显示全部楼层
这样的方法都被很多人用了很久了。。google开始K了。。
回复 支持 反对

使用道具 举报

发表于 2007-7-22 12:57:20 | 显示全部楼层
用的多了就不灵了!
回复 支持 反对

使用道具 举报

发表于 2007-7-22 13:26:37 | 显示全部楼层
对google收录有影响不?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-22 14:36:58 | 显示全部楼层
方法是拿来借鉴的!
回复 支持 反对

使用道具 举报

发表于 2007-7-22 18:09:09 | 显示全部楼层
GG好象默许这样做。
回复 支持 反对

使用道具 举报

发表于 2007-7-23 15:58:45 | 显示全部楼层
gg上次开会不是说了吗
会被k的
回复 支持 反对

使用道具 举报

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

本版积分规则