最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Why does this HTML crash IE? - Stack Overflow

programmeradmin1浏览0评论

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 patibility 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 puters.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ".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 patibility 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 puters.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3/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>
Share Improve this question edited Nov 22, 2011 at 20:33 xbrady asked Nov 22, 2011 at 18:18 xbradyxbrady 1,70314 silver badges23 bronze badges 14
  • It doesn't crash for me. Try this link – Martin. Commented Nov 22, 2011 at 18:24
  • 4 My IE8 does not crash on this html. The first 2 ments are irrelevant and unconstructive. – James Commented Nov 22, 2011 at 18:24
  • @xbrady, can you reproduce the crash in safe mode? – Frédéric Hamidi Commented Nov 22, 2011 at 18:27
  • 2 @Martin. On jsfiddle it doesn't. Create a html file, fill it with the one in this post, and open it on IE8 and the browser will hang up. Strange IE :P – OnesimusUnbound Commented Nov 22, 2011 at 18:33
  • 2 @Rob that's because you run it as standalone .html file it will block any JavaScript code. – user447356 Commented Nov 22, 2011 at 22:56
 |  Show 9 more ments

3 Answers 3

Reset to default 2

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./ , 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.

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.

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/TR/xhtml1/DTD/xhtml1-strict.dtd">
发布评论

评论列表(0)

  1. 暂无评论