我收到以下错误:
SCRIPT1028: Expected identifier, string or number recruit.html;jsessionid=1f7j1qesicu7u, line 646 character 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 解释 class
作为保留字,不加引号就不能用作属性。
您可以重写$('<td>', {class: "myPager"})
至$("<td>").addClass("myPager")
或者只使用$("<td class='myPager'></td>")
。
关于javascript - IE7无法加载jqgrid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14994244/