ie 谷歌插件Chrome Frame[通俗易懂]

ie 谷歌插件Chrome Frame[通俗易懂]弄了很久的东西,记录一下。记得要放到服务上才有效果

大家好,又见面了,我是你们的朋友全栈君。

1.首先下载、安装Chrome Frame插件 (一定要发布到服务器上才起作用)

   在线版很多,自己搜一下

   离线版地址:http://download.csdn.net/detail/wd4java/8284975

  ie 谷歌插件Chrome Frame[通俗易懂]

安装成功后如上图

2.打开需要使用谷歌的页面

    1、所有版本ie都使用谷歌插件

  <meta http-equiv="X-UA-Compatible" content="chrome=1">

     2、指定版本

   <meta http-equiv=”X-UA-Compatible” content=”IE=Edge,chrome=IE6″>

    3、检测Google Chrome框架并提示安装

<html>
<body>
  <script type="text/javascript" 
   src="http://ajax.proxy.ustclug.org/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>

  <style>
   /* 
    CSS rules to use for styling the overlay:
      .chromeFrameOverlayContent
      .chromeFrameOverlayContent iframe
      .chromeFrameOverlayCloseBar
      .chromeFrameOverlayUnderlay
   */
  </style> 

  <script>
   // You may want to place these lines inside an onload handler
   CFInstall.check({
     mode: "overlay",
     destination: "http://www.waikiki.com"
   });
  </script>
</body>
</html>

4、
CFInstall.check()

  • modeoptional
    How the user should be prompted when GCF is missing. Defaults to a value of inline that puts an iframe in the document that points to the value of url. If a value for node is specified this will control where the iframe is placed, else it will appear as the first child of the doucment’s body element. If mode is set to overlay (recommended), an in-page dialog is displayed that floats over page content. If mode is popup, then url is opened in a new (popup) window. It’s recommended that you only use a value of popup when calling check() from a user action, for instance the onclick handler of a buttonelement else popup blocking software may defeat the check.
  • urloptional
    Defaults to “http://google.com/chromeframe”. Set this to change the URL that the prompt (either inline or in a popup) will navigate to. You might use this if you’re using GCF on an intranet or closed environment and you want to prompt users to install from an alternate location.
  • destinationoptional
    The URL to navigate to once CFInstall detects that GCF has been installed.
  • nodeoptional
    The ID or reference to an element that will contain the iframe prompt. If no node is provided, the prompt iframe will be inserted at the top of the document.
  • onmissingoptional
    Function to be called when GCF is missing.
  • preventPromptoptional
    Boolean, defaults to false, which allows you to disable the default prompting mechanism. Use in conjunction with onmissing to implement your own prompt.
  • oninstalloptional
    Function that will be called when GCF is first detected after an install prompt is displayed.
  • preventInstallDetectionoptional
    Boolean, defaults to false. Set this to true to prevent CFInstall from checking whether GCF has been installed. Use this to prevent redirection.
  • cssTextoptional
    Style properties to apply to the prompt iframe when mode is inline.
  • classNameoptional
    CSS classes to apply to the prompt iframe when mode is inline.

5、
CFInstall.check()例子

<html>
<body>
  <!--[if IE]>
    <script type="text/javascript" 
     src="http://ajax.proxy.ustclug.org/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>

    <style>
     .chromeFrameInstallDefaultStyle {
       width: 100%; /* default is 800px */
       border: 5px solid blue;
     }
    </style>

    <div id="prompt">
     <!-- if IE without GCF, prompt goes here -->
    </div>
 
    <script>
     // The conditional ensures that this code will only execute in IE,
     // Therefore we can use the IE-specific attachEvent without worry
     window.attachEvent("onload", function() {
       CFInstall.check({
         mode: "inline", // the default
         node: "prompt"
       });
     });
    </script>
  <![endif]-->
</body>
</html>

详情请参考:http://www.chromium.org/developers/how-tos/chrome-frame-getting-started

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/160279.html原文链接:https://javaforall.net

(0)
上一篇 2022年7月16日 下午12:36
下一篇 2022年7月16日 下午12:46


相关推荐

  • 高等代数第二章行列式思维导图(行列式的知识点总结思维导图)

    HelloWorld,我的朋友,这里是一颗小白蛋,大千世界,很高兴以这样的方式与你相遇前言好久不见,这一次给大家带来考研线代中行列式的相关内容。2021考研数学复习全书+2021李永乐线性代数辅导讲义+2020张宇线代基础课+20211800题=知识技巧思维导图相关重点知识内容+易错点知识+技巧总汇+知识拓展=知识技巧思维导图一战上岸思维导图以题型为出发点,总结了几…

    2022年4月17日
    375
  • Linux安装jdk(两种方式)

    Linux安装jdk(两种方式)最近在研究大数据方面的东西 业务场景是从设备采集数据经过处理然后存放 DB 建设上面的环境第一步肯定是安装 jdk 所以和大家一起学一下基本知识 centos7 5 安装 jdk1 8 安装 jdk 有两种方法 手动安装 yum 安装 yum 安装如下 1 查询要安装 jdk 的版本 命令 yum ylistjava 2 安装 jdk1 8 命令 yuminst

    2026年3月18日
    2
  • OpenClaw之后,微信准备好了吗?

    OpenClaw之后,微信准备好了吗?

    2026年3月14日
    1
  • 【Java】Red5服务器搭建(实现在线直播,流媒体视频播放)「建议收藏」

    引言流媒体文件是目前非常流行的网络媒体格式之一,这种文件允许用户一边下载一边播放,从而大大减少了用户等待播放的时间。另外通过网络播放流媒体文件时,文件本身不会在本地磁盘中存储,这样就节省了大量的磁盘空间开销。正是这些优点,使得流媒体文件被广泛应用于网络播放。流媒体服务器是通过建立发布点来发布流媒体内容和管理用户连接的。流媒体服务器能够发布从视频采集卡或摄像机等设备中传来的实况流,也可以发布事先…

    2022年4月18日
    302
  • 月之暗面宣布Kimi K2模型更新,上下文长度扩展至256K

    月之暗面宣布Kimi K2模型更新,上下文长度扩展至256K

    2026年3月12日
    1
  • SDIO接口的理解

    SDIO接口的理解运用 SD 卡第一步 认识 SDIO 接口做毕业设计需要用到大量的音频文件 一般的存储器满足不了存储要求 故选择 SD 卡作为存储器件 在这里记录一下自己的学习经历 学习一个新的 IC 无非是要么根据时序图写出 Read 和 Write 函数 要么是根据通信总线和 IC 相关操作指令去完成 Read 和 Write 函数 只有能与对应 IC 说话 我们才能去开发它更多地可能性 这里以原子探索者为例 为大家介绍一下 SD 卡相关知识

    2026年3月19日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号