为什么这个 HTML 会使 IE 崩溃?

发布于 2024-12-17 14:50:50 字数 1146 浏览 1 评论 0原文

我有一个页面导致 IE 8 崩溃。我已经把它一直简化为导致崩溃的 html/javascript。 我知道我必须做一些不同的事情来在 IE 中显示我想要的页面而不破坏它。有谁知道我可以向 IE 团队报告此问题以修复它的方法吗?

当您将鼠标悬停在跨度上时会发生崩溃。创建一个临时 .html 文件进行测试。使用 jsfiddle 不会使其崩溃。

更新:确保 IE 未处于兼容模式,以免其崩溃。 Update2:它也会在安全模式下崩溃,因此它不是导致问题的附加组件。我在多台电脑上都试过了。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>test</title>
    <style type="text/css">
        .condPartHover
        {
            border-color: #000000;
            background-color: #E5F0F9;
            color: #1D5987;
        }
    </style>
</head>
<body>
   <ul>
    <li>
        <div>Testing:
            <div style="position:relative; display:inline-block; height:25px;">
                <span style="position:absolute; top:0px; left:0px; border:1px solid #000000; background-color:White;" onmouseover="this.className = 'condPartHover';">test
                </span>
            </div>
        </div>
    </li>
   </ul>
</body>
</html>

I have a page that causes IE 8 to crash. I've dumbed it all the way down to just the html/javascript that causes the crash.
I know I'm going to have to do something different for displaying the page how I want in IE without breaking it. Is anyone aware of a way that I can report this to the IE team to get it fixed?

The crash happens when you mouse over the span. Create a scratch .html file to test. Using jsfiddle doesn't crash it.

Update: Make sure IE isn't in compatibility mode to get it to crash.
Update2: It crashes in safe mode too, so it isn't an add-on causing the problem. I have tried it on multiple computers.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>test</title>
    <style type="text/css">
        .condPartHover
        {
            border-color: #000000;
            background-color: #E5F0F9;
            color: #1D5987;
        }
    </style>
</head>
<body>
   <ul>
    <li>
        <div>Testing:
            <div style="position:relative; display:inline-block; height:25px;">
                <span style="position:absolute; top:0px; left:0px; border:1px solid #000000; background-color:White;" onmouseover="this.className = 'condPartHover';">test
                </span>
            </div>
        </div>
    </li>
   </ul>
</body>
</html>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

寻梦旅人 2024-12-24 14:50:50

有谁知道我可以向 IE 团队报告此问题以获得
修复了吗?

是的,请访问 http://connect.microsoft.com/,在“Internet Explorer Feedback Program”中输入“Internet Explorer Feedback Program”搜索框,它会给你一个链接来向 IE 团队报告此类错误。他们确实会阅读/采取行动,但不要指望很快就会发生任何事情。我不知道旧版本 IE 中的错误是否值得修复。如今,可能只有安全修复仍然适用于 IE8,而不是任何会改变 HTML 渲染或 Javascript 行为的修复。

Is anyone aware of a way that I can report this to the IE team to get
it fixed?

Yes, go to http://connect.microsoft.com/ , enter "Internet Explorer Feedback Program" in the search box and it'll give you a link to report bugs like this to the IE team. They do read/act on them, though don't expect anything quick. Whether a bug in an old version of IE is deemed worthy of fixing I don't know though. It might be only security fixes that are still applied to IE8 nowadays, not any fix that will change the HTML rendering or Javascript behaviour.

自由范儿 2024-12-24 14:50:50

尝试使用 mouseOver 或 mouseEnter 与 jQuery。

$('span').mouseover(function() {
  $('span').addClass("condPartHover");
});

此外,您使用的此方法不再是 HTML 有效的。

Try with mouseOver or mouseEnter with jQuery.

$('span').mouseover(function() {
  $('span').addClass("condPartHover");
});

In addition this method you are using is not HTML valid anymore.

油焖大侠 2024-12-24 14:50:50

您的文档类型不正确,并且您处于怪癖模式。如果您必须使用 xhtml 文档类型,请使用以下之一:

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

Your doctype is incorrect and you are in quirks mode. If you must use the xhtml doctype, use this one:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文