2011-03-02 39 views
1

每当我使用关闭标记的表单时,我的控制台上会收到HTML解析错误(正常恢复)警告。Chrome浏览器在关闭窗体标记时解析错误

所以这给出了解析错误:

<body> 
    <form> 
     ...some_form_fields 
    </form> 
    </body> 

虽然这并不:

<body> 
    <form> 
     ...some_form_fields 
    </body> 

这似乎很奇怪。我检查了HTML 5规范,关闭结束标签被禁止。事实上,他们是必需的。

我使用的是HTML 5文档类型。谷歌浏览器11.

更新:我测试了使用这种非常裸露的HTML,它仍然给出了警告

<!DOCTYPE html> 

<html> 
    <head> 
    </head> 

    <body> 
    <form> 
    </form> 
    </body> 

</html> 
+1

你可以张贴一个链接? – Shad 2011-03-02 00:59:15

+0

对我没有任何警告:Chrome 9.0.597.107 – user194076 2011-03-02 01:00:19

+0

您应该提供更详细的问题描述并发布更多代码。我们目前还没有看到任何错误,它似乎在'表格'标签之间。 – vissi 2011-03-02 01:10:27

回答

3

你什么都没有做(相关)错误。

看到这个错误报告:http://code.google.com/p/chromium/issues/detail?id=73703

测试用例的问题几乎是相同的你:

<!DOCTYPE html> 
<html> 
<head> 
<title>test</title> 
<meta charset="utf-8"> 
</head> 
<body> 
<form> 
</form> 
</body> 
</html> 

这:http://trac.webkit.org/changeset/79816

This patch removes parse error messages from the HTML parser. These messages are displayed at the wrong times, aren't tested, and aren't helpful. We'll try again with some more informative messages and better testing.