Html 如何修复 IE 10 中不匹配的结束标记错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16807595/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 08:50:43  来源:igfitidea点击:

how to fix Unmatched end tag error in IE 10

htmlcssinternet-exploreriframebanner

提问by Andrus

Web page contains 24 iframes which are refreshed periodically using meta refresh in iframe content:

网页包含 24 个 iframe,这些 iframe 使用 iframe 内容中的元刷新定期刷新:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="refresh" content="25">
    <base target="_parent" />
    <link href="/store/Content/Css/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <a class="picture ui-corner-all" 
        href="/store/Store/Details?product=FRUNBLUEJASS">
        <img src="/store/Store/MainImageThumb?product=FRUNBLUEJASS" />
    </a>
</body>
</html>

In Internet Explorer 10 after page is refreshed by pressing F5, error

在 Internet Explorer 10 中按 F5 刷新页面后,错误

HTML1509: Unmatched end tag. 
store, line 470 character 5

appears in IE developer tools console tab and bottom group text in page appear in single column. In Chrome page is rendered properly without error. I verified that all tags are matched in page. How to fix this ?

出现在 IE 开发者工具控制台选项卡中,页面中的底部组文本出现在单列中。在 Chrome 页面中正确呈现没有错误。我验证了页面中的所有标签都匹配。如何解决这个问题?

jquery, jquery iu, mono/ASP.NET MVC3 are used.

使用jquery、jquery iu、mono/ASP.NET MVC3。

采纳答案by Felix Bayer

This doesn't seem to be a browser problem to me. Take a look at the cleaned up source code of the site you linked.. you'll end up with an end tag without matching start tag.

这对我来说似乎不是浏览器问题。看看你链接的站点的清理过的源代码......你最终会得到一个没有匹配开始标签的结束标签。

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <base href='/store/' />
    *snip*
    <title>Pood</title>
</head>
<body>
    *snip*
        <div id="main">
            *snip*
            <div class='maincontent'>
                *snip*
                <div class='highlightcolor'>
                    *snip*
                </div>  

                <p class='clear_both'>
                    <div class="bottomcategories">
                        *snip*
                    </div>
                </p>
            </div>
            <div style="clear: left">
                *snip*
            </div>
        </div>

        <div id="footer">
            *snip*
            <div style="text-align: center">
            </div>
        </div>
    ** here **
    </div>
    ** here **
</body>
</html>

Anyway when I read about 24 auto-self-refreshing iframes on a single page I have to ask if this is really the best/up-to-date solution. ;-)

无论如何,当我在一个页面上阅读大约 24 个自动自我刷新的 iframe 时,我不得不问这是否真的是最好的/最新的解决方案。;-)