无法在 IE7 中加载 jqgrid



我得到以下错误:

SCRIPT1028:需要标识符、字符串或数字recruit.html;jsessionid=1f7j1qesicu7u,第646行字符56

 var pagerPrevTD = $('<td>',  {class: "myPager"}), prevPagesIncluded = 0,
 pagerNextTD = $('<td>', { class: "myPager"}), nextPagesIncluded = 0,
 totalStyle = grid[0].p.pginput === false,
 startIndex = totalStyle? this.p.page-MAX_PAGERS*2: this.p.page-MAX_PAGERS;

我认为应该将{class: "myPager"}替换为

{"class": "myPager"}

因为旧版本的Internet Explorer将CCD_ 2解释为保留字,不加引号就不能用作属性。

您可以将$('<td>', {class: "myPager"})重写为$("<td>").addClass("myPager"),也可以只使用$("<td class='myPager'></td>")

最新更新