2
我在内联内容中使用JQuery ColorBox,这在大多数浏览器中似乎都能正常工作,但是当我在IE8中使用它时,首次加载罚款,然后内容的iFrame部分不显示?使用jQuery的iFrame IE8 ColorBox
我检查了源代码,并且iframe在html中正确呈现。我使用asp.net 3.5和c#作为服务器端。
服务器端代码:
<script>
jQuery(document).ready(function() {
jQuery.fn.colorbox({ width: 376, inline: true, href: "#LightBox" });
});
</script>
<div style='display:none'>
<div id='LightBox' style='padding:10px; background:#fff;'>
<sc:Image runat="server" ID="imgBanner" Field="Banner" MaxWidth="346" />
<sc:Text runat="server" ID="txtContent" Field="Content" />
<iframe runat="server" id="iFrm" height="220px" scrolling="no" frameborder="0" />
<img src="/images/loading.gif" alt="loading" id="preload-img" />
</div>
</div>
客户端:
<div style='display:none'>
<div id='LightBox' style='padding:10px; background:#fff;'>
<img src="~/media/Images/Premier/newsletters/ignite/header_4.ashx?mw=346" alt="Ignite" width="346" height="132" />
<p><strong>Free e-newsletter from Premier</strong> </p>
<p>Hot topics impacting your life today...</p>
<p>You are invited to receive <strong>Ignite</strong>, the UK's leading Christian <br />e-publication,
dealing with the hottest issues of our day: from abortion, to going 'green', to the debate over homosexuality.</p>
<p>To receive your free weekly subscription to <strong>Ignite</strong> fill in your details below.</p>
<iframe id="content_10_iFrm" height="220px" scrolling="no" frameborder="0" src="http://email.premierchristianmedia.co.uk/premierradiolz//WebCapture.aspx?pID=334&t=0"></iframe>
<img src="/images/loading.gif" alt="loading" id="preload-img" />
</div>
</div>
这似乎没有工作。它似乎已加载的iframe和'认为'内容被加载,但只显示为白色,如果我右键点击iframe并刷新它的作品? – 2011-12-28 12:55:53