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


相关推荐

  • 阿里编程规范 pdf_阿里前端开发规范

    阿里编程规范 pdf_阿里前端开发规范阿里编程规范及阿里Java开发规约插件AlibabaJavaCodingGuidelines统一规范标准将有助于提高行业编码规范化水平,帮助行业人员提高开发质量和效率、大大降低代码维护成本。2017年年初,首次公开了《阿里巴巴Java开发手册》,自从第一个版本起,倍受业界关注。为了让开发者更加方便、快速的将规范推动并实行起来,阿里巴巴基于手册内容,研发了一套自动化的IDE检测插件(…

    2025年7月4日
    0
  • C#中使用SQLDMO的StoredProcedure对象(存储过程)创建数据表「建议收藏」

    C#中使用SQLDMO的StoredProcedure对象(存储过程)创建数据表「建议收藏」               …….               SQLDMO.StoredProcedurestrProc=newSQLDMO.StoredProcedure();               //Assignanametostoredprocedure               strProc.Name=”createCustomerT

    2022年7月26日
    7
  • pytorch tensor类型转换_pytorch转caffe

    pytorch tensor类型转换_pytorch转caffetorch.Tensor类型的数据loss和acc打印时,如果写成以下写法print(‘batch_loss:’+str(loss.data)+’batchacc:’+str(acc.data))则不仅会打印出loss和acc的值,还会打印出device信息和tensor字样,如下:如果仅想打印出数值,使得打印出的信息更加简洁,则要用以下写法print(‘batch_loss:{:.3f}ba…

    2022年10月10日
    1
  • axisfault faultcode_转付证明怎么写

    axisfault faultcode_转付证明怎么写2007-06-26关于AxisFault的说明一般说来,不可避免的WebService的服务中也会出现异常,举个简单的例子,一个服务接受一个SOAP请求消息,获取有效负载后,进行一个数据库更新操作,而在更新操作过程中发生了SQLException,这个时候就需要告诉客户端(调用WebService)出现异常了,Axis2将异常封装成为一个AxisFault进行抛出。任何类型的…

    2022年9月13日
    0
  • Python实现久坐提醒小助手程序「建议收藏」

    Python实现久坐提醒小助手程序「建议收藏」不论是日常的工作还是学习,现代年轻人在电脑屏幕时长数据能让人惊掉下巴,继而引发一系列身体不适的现象。小李也是久坐族中的一员,为了时刻提醒自己起来活动活动,我开发了一款基于PythonGU…

    2022年9月26日
    1
  • ssl证书绑定域名还是ip_ssl证书类型

    ssl证书绑定域名还是ip_ssl证书类型答案:IP地址可以申请SSL证书实现IP的https加密,快速拿到IP证书,请直接联系本站右侧在线客服。环度网信是可以帮助您的IP实现https加密的,只需要您满足如下几个条件:1、您的IP地址是公网IP,暂不支持内网IP申请可信的SSL证书,因为只有公网IP是全球唯一的,能够验证IP所有者的管理权限。2、您的IP需要开通或者临时开通80或者443端口,因为我们在验证您的IP管理权限的时候,会给您…

    2022年9月30日
    0

发表回复

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

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