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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • spring-schedul实现动态添加定时任务

    spring-schedul实现动态添加定时任务

    2021年7月12日
    104
  • oracle修改用户名密码语句_oracle修改数据库用户名

    oracle修改用户名密码语句_oracle修改数据库用户名oracle修改用户名,密码首先我们打开命令行,cmd,进入oracle的后台管理界面,当然,还有很多其他的方式可以进入oracle后台管理界面,比如使用PL/SQL界面化工具,或者使用oracle自带的SQL工具。打开命令窗口,登录oracle后台管理界面:具体命令为在运行处输入cmd,在弹出的命令提示窗口输入setoracle_sid=数据库名称,输入sqlplus进入ora…

    2022年7月28日
    7
  • 乱码问题分析

    乱码问题分析字符乱码的事,估计大家都遇到过,很烦,什么utf-8、GBK、GB2312转来转去,不知道什么时候才能转正常。我们做个试验,如果你是windows系统,打开记事本,新建一个文件,输入”联通”两个字之后,保存,关闭,然后再次打开,出现了什么现象?乱码!那你赶紧去找IT吧,你中招了!开玩笑的,这是著名的“windows联通之谜事件”。继续往下看,后面会有谜底的解释。那么我们就讨论下字符编码哪些事吧,首

    2022年5月27日
    63
  • 5G物理信道和物理信号定义

    5G物理信道和物理信号定义一、上行链路物理信道包含以下信道:1、物理上行链路共享信道PUSCH2、物理上行控制共享信道PUCCH3、物理随机接入信道PRACH其中PUSCH支持的调制方案有:pai/2-BPSKQPSK16QAM64QAM256QAM物理上行链路控制信道支持多种格式:fomat0OFDM符号长度1-2fomat1OFDM符号长度4-14fomat2OFDM符号…

    2022年5月12日
    52
  • Reverse Integer

    Reverse Integer

    2021年12月15日
    41
  • linux mysql1146_MySQL主从同步及错误1146解决办法

    linux mysql1146_MySQL主从同步及错误1146解决办法在实际使用MySQL的时候我们有时要增加一些新的库进行主从同步,所以可以通过修改my.cnf文件以及在主库上添加用户连接权限就可以实现主从同步,而在做主从同步的时候碰到几个问题这里就和大家说一下,至于如何构建主从同步这里就不再多说了,相信在网上能找到一大堆,这里就稍稍提几个关键点,在从库下的my.cnf添加如下几行:server-id=2#一般主库是1,从库可以除1以外的数字log-bin=m…

    2022年6月4日
    92

发表回复

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

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