javascript - Fancybox 2 iframe 在 IE 中无法正常工作

标签 javascript internet-explorer jquery-plugins fancybox

我在使用 Fancybox 2.0 和 Internet Explorer 时遇到问题。它在所有其他浏览器上运行良好。

在 IE 中就像灯箱 div 位于 iframe 之上,我无法点击任何按钮。

页面中的位置也与其他浏览器不同。

这是我用来调用它的参数

$('.fancybutton').fancybox({
        type      : 'iframe',
        maxWidth    : 800,
        maxHeight   : 600,
        fitToView   : true,
        width       : '70%',
        height      : '80%',
        autoSize    : false,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none'
});

非常感谢任何帮助

我在 anchor 标记上打开带有普通链接的 iframe

更新

我添加了 DOCTYPE,并且 iframe 在所有浏览器中都可以正常打开,但是...... 在此 iframe 中,我有许多链接,这用作弹出菜单。链接是简单的 anchor 标记,但当我在 IE 中单击链接时,没有任何反应。它在任何其他浏览器上都能完美运行:(

干杯, 费德里科

最佳答案

事实证明,JFK 建议我缺少 DOCTYPE。

我把它加在了顶部,现在它在所有浏览器上都能正常工作了

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

谢谢!

关于javascript - Fancybox 2 iframe 在 IE 中无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9565443/

相关文章:

javascript - 我可以在 Bootstrap 3 中为折叠 Accordion 指定相对 “data-target”,同时保留 “collapse others” 功能吗?

javascript - 将使用 window.stop();对搜索引擎不利?

c# IE Plugin BHO 获取pdf

javascript - 如何强制 AngularJS 表单通过 DOM 操作(无用户输入)填充必填字段?

html - 执行文件 -> 打印时嵌入 PDF 内容

jQuery 全日历 : Disable scrolling in Agenda View?

javascript - jQuery fullcalendar 在按键时不获取事件

javascript - 这些二维数组包含结构不同的相同信息。如何将一个转换为另一个?

jQuery 屏蔽输入插件 : Wrong cursor position in Phone Masking

javascript - Firefox:如果我选择地址栏并单击 Enter,页面不会重新加载