【问题标题】:how to fix Unmatched end tag error in IE 10如何修复 IE 10 中不匹配的结束标记错误
【发布时间】:2013-05-24 08:12:22
【问题描述】:

网页包含 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>

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

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

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

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

【问题讨论】:

    标签: html css internet-explorer iframe banner


    【解决方案1】:

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

    <!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>
    

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

    【讨论】:

    • 谢谢。在答案中缺少 html &lt;div id="container"&gt;。在站点中,这是存在的,并且所有标签都匹配。消息是由在 p 元素中嵌套 div 引起的。关于刷新我在stackoverflow.com/questions/16807250/… 中发布的问题的 24 张图片。你也能回答一下吗?
    猜你喜欢
    • 2014-10-19
    • 1970-01-01
    • 2020-07-16
    • 2021-09-23
    • 1970-01-01
    • 1970-01-01
    • 2023-02-22
    • 2019-02-28
    • 2023-03-30
    相关资源
    最近更新 更多