jqGrid ---Grid can not be used in this ('quirks...

 

今天在使用jquery.jqGrid.min.js时 弹出错误提示 

Grid can not be used in this ('quirks') mode!

 

错误提示

 

查看源码后发现

if(document.documentMode !== undefined ) { // IE only

if(document.documentMode <= 5) {

alert("Grid can not be used in this ('quirks') mode!");

return;

}

}

其中document.documentMode值 查资料后解释如下

除ie8以外的任何浏览器上返回的值是undefined.

ie8上面如果页面没有标准头的话,返回值为5。

ie8上面如果页面有标准头的话:

将返回7或者8,确定使用的是ie7渲染模式或者是ie8渲染模式。

 

寻思了下 估计是文件头这类问题

仔细与其他文件对比后

增加<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> 对于文档声明后 不报此错




原文:http://my.oschina.net/luckyi/blog/80297

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章