Internet explorer 如何允许用户在出现提示时取消Chrome框架安装

Internet explorer 如何允许用户在出现提示时取消Chrome框架安装,internet-explorer,google-chrome-frame,Internet Explorer,Google Chrome Frame,我使用的是谷歌的默认CFInstall脚本,但有一些小改动: 这会提示IE8或更少的用户安装Chrome框架。但用户无法取消或关闭iFrame。 我怎样才能做到这一点。好的,我明白了:我需要将模式设置为覆盖: 这有一个缺点:刷新页面后对话框不会重新出现 <style> .chromeFrameInstallDefaultStyle { width: 80%; /* default is 800px */ border: 5px solid blue; po

我使用的是谷歌的默认CFInstall脚本,但有一些小改动:

这会提示IE8或更少的用户安装Chrome框架。但用户无法取消或关闭iFrame。
我怎样才能做到这一点。

好的,我明白了:我需要将模式设置为覆盖: 这有一个缺点:刷新页面后对话框不会重新出现

<style>
 .chromeFrameInstallDefaultStyle {
   width: 80%; /* default is 800px */
   border: 5px solid blue;
   position: absolute;
   left: 40%;
   z-index: 1000;
 }
</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>
<style>
 .chromeFrameInstallDefaultStyle {
   width: 80%; /* default is 800px */
   border: 5px solid blue;
   position: absolute;
   left: 40%;
   z-index: 1000;
 }
</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: "overlay", // "inline" = the default
     node: "prompt"
   });
 });
</script>