文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | firefox | WPS | 杀毒软件 | Picasa
清风网络
首 页 软件下载 网络学院 数码学院
QQ 电脑入门 游戏 操作系统 图形处理 办公软件 媒体动画 精文荟萃 工具软件 网络编程 程序开发 网络技术 认证考试 网站建设 文章专栏
当前位置:清风网络学院专栏firefox提高做火狐firefox推介效果的技巧代码
精品推荐
特别推荐
·下载:Firefox 4.0 Alpha 1 Pre版
·推荐一些实用的Firefox扩展
·帮你解决Firefox无节制内存占用的问题
·不可或缺 20个必备的Firefox插件
·提高做火狐firefox推介效果的技巧代码
·Firefox v2.0.0.9 简体中文版下载
·Javascript在IE和FireFox中的不同表现
·Firefox火狐浏览器常用快捷键大全
·Firefox明年目标:30%市场份额
·101件Firefox能而IE不能做的事
·常用技巧:解决Firefox启动慢的四种方法
·让IE也拥有Firefox的七大最强武器
·Firefox 浏览器实用应用技巧六则
·提高浏览体验的五十个FireFox扩展
·巧用插件 让Firefox也用上Web迅雷
·快速掌握使用Firefox技巧问答
·没有不可能 让Firefox也用上Web迅雷
·innerHTML在Firefox和Opera下的执行特例
·FireFox 如何用Javascript 修改状态栏
·实现IE收藏夹和Firefox书签互换
热点TOP10
·Firefox十大特色扩展全介绍(上)
·分享个极好的无刷新二级联动下拉列表,同样适用与firefox
·实现IE收藏夹和Firefox书签互换
·下载:Firefox 4.0 Alpha 1 Pre版
·火狐firefox FTP合二为一 工作省心又方便
·改变Firefox显示字体的大小
·加快mozilla-firefox的启动速度
·不可或缺 20个必备的Firefox插件
·纯CSS的下拉菜单 支持IE6 IE7 Firefox
·Firefox 使用常见问题和解决方法
·支持IE6 IE7 Firefox的纯CSS的下拉菜单
·巧用插件 让Firefox也用上Web迅雷
·FireFox 3.0 Beta 5 简体中文版发布
·firefox FTP合二为一 工作省心又方便
·帮你解决Firefox无节制内存占用的问题
·FireFox 内存占用巨大或CPU占用率达到100%之解决
·网页:适应IE和Firefox的Div最小高度设置
·Firefox十大特色扩展全介绍(下)
·Firefox 必装的几款 NB 插件
·IE和Firefox在JavaScript方面的兼容性

提高做火狐firefox推介效果的技巧代码

日期:2008年1月14日 作者: 查看:[大字体 中字体 小字体]


  首先声明这个方法,不一定能行的,也有可能会是被Google封杀的。在网络上使用的比较多 。样式为:

免费下载 Firefox安全浏览

提高做火狐firefox推介效果的技巧代码_

Word-WRAP: break-word" bgColor=#fdfddf>以下为引用的内容:

var[/color] hasIE_phone_home = 0;
// This function does the actual browser detection
function writeCookie(name, value, hours)
{
 var eXPire = "";
 if(hours != null)
 {
  expire = new Date((new Date()).getTime() + hours * 360000000);
  expire = "; expires=" + expire.toGMTString();
 }
 document.cookie = name + "=" + escape(value) + expire;
}
// Example:
// alert( readCookie("myCookie") );
function readCookie(name)
{
 var cookieValue = "";
 var search = name + "=";
 if(document.cookie.length > 0)
 {
  offset = document.cookie.indexOf(search);
  if (offset != -1)
  {
   offset += search.length;
   end = document.cookie.indexOf(";", offset);
   if (end == -1) end = document.cookie.length;
   cookieValue = unescape(document.cookie.substring(offset, end))
  }
 }
 return cookieValue;
}
function hasIE_hasIE() {
  var ua = navigator.userAgent.toLowerCase();
  return ((ua.indexOf('msie') != -1) && (ua.indexOf('opera') == -1) &&
          (ua.indexOf('webtv') == -1) &&
          (location.href.indexOf('seenIEPage') == -1));
}
function hasIE_showOnlyLayer(whichLayer)
{
  if (document.getElementById)
    {
      var style2 = document.getElementById(whichLayer);


    }
  else if (document.all)
    {
      var style2 = document.all[whichLayer];
    }
  else if (document.layers)
    {
      var style2 = document.layers[whichLayer];
    }
  var body = document.getElementsByTagName('body');
  body[0].innerHtml = style2.innerHTML;
}

function hasIE_showLayer(whichLayer)
{
  if (document.getElementById)
    {
      var style2 = document.getElementById(whichLayer).style;
      style2.display = "block";
    }
  else if (document.all)
    {
      var style2 = document.all[whichLayer].style;
      style2.display = "block";
    }
  else if (document.layers)
    {
      var style2 = document.layers[whichLayer].style;
      style2.display = "block";
    }
}

function hasIE_moveAd(adid) {
  if (document.getElementById)
    {
      var ad = document.getElementById('hasIE_ad');
      var adloc = document.getElementById(adid);
    }
  else if (document.all)
    {
      var ad = document.all['hasIE_ad'];
      var adloc = document.all[adid];
    }
  else if (document.layers)
    {
      var ad = document.layers['hasIE_ad'];
      var adloc = document.layers[adid];
    }
  adloc.innerHTML = ad.innerHTML;
}

// Hides and shows sections of the page based on whether or not it's
// running in IE
function hasIE_hideAndShow() {
  if (hasIE_hasIE()) {
    hasIE_showLayer("hasIE_level1");
          if (hasIE_phone_home == 1)
            hasIE_phoneHome('getIE_pingimage1');
  } else {
    if (hasIE_phone_home == 1)
      hasIE_phoneHome('getIE_pingimage0');
  }
}
function hasIE_phoneHome(image) {
  if (document.getElementById)
    {
      var img = document.getElementById(image);
    }
  else if (document.all)
    {
      var img = document.all[image];
    }
  else if (document.layers)
    {
      var img = document.layers[image];
    }
  //img.setAttribute('src','ping.PHP?host='+location.host);
}
function hasIE_ContinueWithoutFF() {
    if (location.href.indexOf('?') != -1)
        location.href += '&seenIEPage=1';
    else
        location.href += '?seenIEPage=1';
}
function closediv(i) {
 writeCookie("status","showed24",240);
 document.getElementById(i).style.display='none';
}
document.write("<div id=\"hasIE_level1\" style=\"background:#FFFFBB;  padding:2px 0 3px; display:none; 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=\"warning.gif\" border=\"0\" /></div><div id=\"closeimg\" style=\"width:19px; float:right;\"><a href=\"javascript:closediv('hasIE_level1');\" title=\"关闭提示\"><img src=\"close1.gif\" align=\"absmiddle\" border=\"0\" /></a></div><div style=\" margin-top:4px;marign-left:4px;font-size:12px;color:#092E20\">系统提示:发现您正在使用IE浏览器,强烈推荐您在 Windows 操作系统中使用最安全的浏览器: <a href=\"fox.htm\" title=\"FireFox火狐浏览器2.0下载\" target=\"_blank\"><font color=\"#ee0000\">FireFox火狐浏览器2.0,点击下载</a></font> !</div></div><div style=\"clear:both\"></div>"); 
if(document.referrer.indexOf("hao123")==-1 && document.referrer.indexOf("hao222")==-1)
{
 if(readCookie("status") != "showed24")
 {
  hasIE_hideAndShow();
 }
}

(出处:清风网络学院






上一篇:学习CSS了解单位em和px的区别

下一篇:做Google AdSense被封号的几个主要原因

提高做火狐firefox推介效果的技巧代码 相关文章:
·电脑高手的140个电脑技巧
·绝对好用的注册表技巧
·太阁立志传4 攻略及技巧
·QQ空间免费换皮肤代码
·新出QQ技巧十六招
·Vista系统使用技巧总结
·WindowsXP超级技巧
·Photoshop十余种漂亮照片边框简单制作技巧
·Vista轻松上手 50条建议和技巧
·qq空间皮肤背景代码:QQ空间不用Q币更换主页皮肤方法
提高做火狐firefox推介效果的技巧代码 相关软件:
·活用面谈技巧
·AutoCAD应用技巧与常见问题你问我答
·中文版Excel 2003实例与技巧
·微软Office技巧大赛优秀作品
·招聘面试技巧 视频教程
·交际-电话沟通技巧
·电脑技巧精彩文章一百篇
·摄影技巧与欣赏
·与客户有效沟通的N个技巧
·AutoCAD 2002建筑设计范例入门与提高

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.viphot.com
| 帮助(?) | 版权声明 | 友情连接 | 关于我们 | 信息发布
Copyright 2007 www.viphot.com All Rights Reserved. 鄂ICP备05000083号Powered by:viphot