ie 谷歌插件Chrome Frame
生活随笔
收集整理的這篇文章主要介紹了
ie 谷歌插件Chrome Frame
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.首先下載、安裝Chrome Frame插件 (一定要發布到服務器上才起作用)
? ?在線版很多,自己搜一下
? ?離線版地址:http://download.csdn.net/detail/wd4java/8284975
??
安裝成功后如上圖
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.googleapis.com/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 handlerCFInstall.check({mode: "overlay",destination: "http://www.waikiki.com"});</script> </body> </html> 4、 CFInstall.check()
- mode:?optional
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. - url:?optional
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. - destination:?optional
The URL to navigate to once?CFInstall?detects that GCF has been installed. - node:?optional
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. - onmissing:?optional
Function to be called when GCF is missing. - preventPrompt:?optional
Boolean, defaults to?false, which allows you to disable the default prompting mechanism. Use in conjunction with?onmissing?to implement your own prompt. - oninstall:?optional
Function that will be called when GCF is first detected after an install prompt is displayed. - preventInstallDetection:?optional
Boolean, defaults to?false. Set this to?true?to prevent?CFInstall?from checking whether GCF has been installed. Use this to prevent redirection. - cssText:?optional
Style properties to apply to the prompt?iframe?when?mode?is?inline. - className:?optional
CSS classes to apply to the prompt?iframe?when?mode?is?inline.
<html> <body><!--[if IE]><script type="text/javascript" src="http://ajax.googleapis.com/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 worrywindow.attachEvent("onload", function() {CFInstall.check({mode: "inline", // the defaultnode: "prompt"});});</script><![endif]--> </body> </html>
詳情請參考:http://www.chromium.org/developers/how-tos/chrome-frame-getting-started
總結
以上是生活随笔為你收集整理的ie 谷歌插件Chrome Frame的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 前端学习(707):循环小结
- 下一篇: android studio 模拟器 简