我正在尝试构建一个由第一次查看网站时激活的覆盖框组成的网页。然后访问者将单击覆盖框上的关闭并查看网站的其余部分。
我所拥有的在 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>