IE8使用兼容性视图强制刷新网页

IE8 force refreshes the webpage using compatibility view

本文关键字:刷新 网页 视图 兼容性 IE8      更新时间:2023-09-26

我使用一个简单的JavaScript方法在点击按钮时打开颜色框&它在所有浏览器中都能正常工作,IE8除外,它将在兼容模式下刷新页面推送浏览器。这是我的代码示例:

<script type="text/javascript">
    function PopulateReferral() {
        $.colorbox({ inline: true, width: "775px", height: "800px", href: "#divPartialReferralUpdate" });
    }
</script>
<div id="divPartialReferralUpdate" style="margin:10px;">
        <div id="divCurrentNotes" style="max-height:300px; width:660px; overflow:scroll"></div>
</div>

如果,我从div上的样式中删除溢出标记,它工作得很好。colorbox&溢流有没有办法固定div高度?

我也经历过IE8将自动进入comp模式的这种行为。在我的情况下,我更改了一些css,它是可以的。

你可以尝试自动溢出,但我不能100%确定IE8是否会提供滚动条。

<div id="divCurrentNotes" style="max-height:300px; width:660px; overflow:auto;"></div>