为什么这个 HTML 会使 IE 崩溃?
我有一个页面导致 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,请访问 http://connect.microsoft.com/,在“Internet Explorer Feedback Program”中输入“Internet Explorer Feedback Program”搜索框,它会给你一个链接来向 IE 团队报告此类错误。他们确实会阅读/采取行动,但不要指望很快就会发生任何事情。我不知道旧版本 IE 中的错误是否值得修复。如今,可能只有安全修复仍然适用于 IE8,而不是任何会改变 HTML 渲染或 Javascript 行为的修复。
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.
尝试使用 mouseOver 或 mouseEnter 与 jQuery。
此外,您使用的此方法不再是 HTML 有效的。
Try with mouseOver or mouseEnter with jQuery.
In addition this method you are using is not HTML valid anymore.
您的文档类型不正确,并且您处于怪癖模式。如果您必须使用 xhtml 文档类型,请使用以下之一:
Your doctype is incorrect and you are in quirks mode. If you must use the xhtml doctype, use this one: