标签的闭合问题
今天发现了一个非常奇怪的浏览器兼容性问题:
我想在博客上放一个日历,于是下载了jquery-easyui,经过修改完成所需要的效果后,准备放入项目中,发现一个很奇怪的问题:
该日历效果在chrome浏览器中显示相当正常,但是在IE8及其兼容模式下,出现了一些问题:只显示了当前页面的背景,页面所有内容都没有显示,我起初怀疑可能是jsp解析成html源代码时出现问题,可是检查了一下,并且使用html页面测试了一下,仍然是同样的情况。
我相当的郁闷,几经周折,终于找到了问题所在:
<script type="text/javascript" src="/js/jquery-1.4.2.min.js" /> <script type="text/javascript" src="/js/jquery.easyui.min.js" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js" ></script> <script type="text/javascript" src="js/jquery.easyui.min.js" ></script>
,终于被你发现了。 14 楼 longphoenix 2010-07-13 几经周折 就可以了 15 楼 magicbu 2010-07-13 The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.