Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 覆盖框在firefox中工作,但在iexplorer中不工作_Jquery - Fatal编程技术网

Jquery 覆盖框在firefox中工作,但在iexplorer中不工作

Jquery 覆盖框在firefox中工作,但在iexplorer中不工作,jquery,Jquery,我试图建立一个网页组成的覆盖框,是激活时,该网站是第一次查看。然后,访问者将单击覆盖框上的“关闭”,并查看网站的其余部分 我所拥有的功能在firefox中运行得非常好。但在iexplorer中,它会导致iexplorer出现以下错误:-“Internet Explorer阻止此页运行脚本或ActiveX控件。” 如何修改它,使iexplorer不会出现此错误,并正确加载页面 以下是html:- <html lang="en"> <head> <script src=

我试图建立一个网页组成的覆盖框,是激活时,该网站是第一次查看。然后,访问者将单击覆盖框上的“关闭”,并查看网站的其余部分

我所拥有的功能在firefox中运行得非常好。但在iexplorer中,它会导致iexplorer出现以下错误:-“Internet Explorer阻止此页运行脚本或ActiveX控件。”

如何修改它,使iexplorer不会出现此错误,并正确加载页面

以下是html:-

<html lang="en">
<head>
<script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>

<style>
#facebox {

/* overlay is hidden before loading */
display:none;

/* standard decorations */
width:400px;
border:10px solid #666;

/* for modern browsers use semi-transparent color on the border. nice! */
border:10px solid rgba(82, 82, 82, 0.698);

/* hot CSS3 features for mozilla and webkit-based browsers (rounded borders) */
-moz-border-radius:8px;
-webkit-border-radius:8px;
  }

  #facebox div {
    padding:10px;
    border:1px solid #3B5998;
    background-color:#fff;
    font-family:"lucida grande",tahoma,verdana,arial,sans-serif
  }

  #facebox h2 {
    margin:-11px;
    margin-bottom:0px;
    color:#fff;
    background-color:#6D84B4;
    padding:5px 10px;
    border:1px solid #3B5998;
    font-size:20px;
  }
  </style>




</head>

<body>


<div class="main-content">

    <!-- Your Content Here -->

<p>Content</p>

</div>




<!-- facebook dialog -->
<div id="facebox">
  <div>
    <h2>Facebox</h2>
    <p>
      This dialog is opened programmatically when the page
      loads. There is no need for a trigger element.
    </p>
    <form>
      <input type="file" />
    </form>
    <p style="color:#666">
      To close, click the Close button or hit the ESC key.
    </p>
    <!-- yes/no buttons -->
    <p>
      <button class="close"> Close </button>
    </p>
    </div>
</div>

<script>
$(document).ready(function() {
  $("#open_now").click(function() {
      $("#facebox").overlay().load();
  });

    // select the overlay element - and "make it an overlay"
  $("#facebox").overlay({

    // custom top position
    top: 60,

    // some mask tweaks suitable for facebox-looking dialogs
    mask: {

    // you might also consider a "transparent" color for the mask
    color: '#000',

    // load mask a little faster
    loadSpeed: 200,

    // very transparent
    opacity: 0.5
    },

    // disable this for modal dialog-type of overlays
    closeOnClick: false,

    // load it immediately after the construction
    load: true

    });
    });
</script>


</body>

</html>

#脸谱盒{
/*覆盖层在加载之前隐藏*/
显示:无;
/*标准装饰*/
宽度:400px;
边框:10px实心#666;
/*对于现代浏览器,在边框上使用半透明颜色。很好*/
边框:10px固体rgba(82,82,82,0.698);
/*针对mozilla和基于webkit的浏览器的热门CSS3功能(圆形边框)*/
-moz边界半径:8px;
-webkit边界半径:8px;
}
#脸谱室{
填充:10px;
边框:1px实心#3B5998;
背景色:#fff;
字体系列:“lucida grande”、tahoma、verdana、arial、无衬线
}
#面板盒h2{
利润率:-11px;
边缘底部:0px;
颜色:#fff;
背景色:#6D84B4;
填充物:5px10px;
边框:1px实心#3B5998;
字体大小:20px;
}
内容

脸谱盒 此对话框在页面打开时以编程方式打开 荷载。不需要触发器元素。

要关闭,请单击“关闭”按钮或按ESC键。

接近

$(文档).ready(函数(){ $(“#立即打开”)。单击(函数(){ $(“#facebox”).overlay().load(); }); //选择覆盖元素-并“使其成为覆盖” $(“#facebox”)。覆盖({ //自定义顶部位置 排名:60, //一些掩码调整适合于外观为facebox的对话框 遮罩:{ 你也可以考虑一个“透明”的面具颜色。 颜色:“#000”, //加载掩码快一点 装载速度:200, //非常透明 不透明度:0.5 }, //对模式对话框类型的覆盖禁用此选项 closeOnClick:false, //施工结束后立即装载 负载:真 }); });
只有在本地运行项目时,才会出现此问题。如果将项目上载到服务器并显示页面,则不应出现此错误。

我们讨论的是什么版本的IE?