IE9 Quirks模式 - Doctype语句注释掉了

时间:2013-02-18 20:08:41

标签: html internet-explorer-9 doctype quirks-mode

我遇到的问题是IE9在Quirks模式下在我的网站上呈现单个页面。

http://www.bettereverafter.com/index.php?fc=module&module=blockwishlistpro&controller=view&token=E5D343F0E9D5C666

出于某种原因,它正在我的头文件中进行DOCTYPE扩展并注释掉。我使用的Doctype是:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

它似乎正在引入一些额外的代码,我认为这些代码来自这里:

看起来它在这里被调用:

private function _displayProducts($id_wishlist)
{
    global $cookie;
    include_once(dirname(__FILE__).'/WishListpro.php');
    include_once(_PS_CLASS_DIR_.'/Message.php');
echo "  
<script type='text/javascript'> 
// <![CDATA[
ThickboxI18nImage = 'Image';
ThickboxI18nOf = '/';
ThickboxI18nClose = 'X';
ThickboxI18nOrEscKey = 'Esc';
ThickboxI18nNext = '>';
ThickboxI18nPrev = '<';
tb_pathToImage = '"._MODULE_DIR_.self::modulename."/img/loadingAnimation.gif';
//]]> 
</script>";

我的问题是,该代码实际上并不在头文件中,而是来自其他地方。我不知道它是如何在实际的头文件之前加载的......

我已经尝试过添加但是没有做任何事情。

其他每一页似乎都运行正常,只有这一页。如果我强制它进入IE9标准,它看起来很好。任何想法将不胜感激!

1 个答案:

答案 0 :(得分:1)

问题是由于您在doctype之前使用此代码造成的:

<script type='text/javascript'> 
// <![CDATA[
    ThickboxI18nImage = 'Image';
    ThickboxI18nOf = '/';
    ThickboxI18nClose = 'X';
    ThickboxI18nOrEscKey = 'Esc';
    ThickboxI18nNext = '>';
    ThickboxI18nPrev = '<';
    tb_pathToImage = '/modules/blockwishlistpro/img/loadingAnimation.gif';
//]]>
</script>

在您的doctype或IE将以怪癖模式而非标准模式呈现之前,您不能拥有任何内容(甚至不是评论)。

相关问题