jquery IE11 上的 tablesorter 未关闭标签
jquery tablesorter unclosed tag on IE11
我在客户端系统(版本 11.0.9600.18161)和 Chrome(版本 50.0.2661.102 m)的 IE11 上使用 jquery 表格排序器,表格不会按在 IE 中查看控制台后,单击 header,我看到:
HTML1509: Unmatched end tag.
我查看了生成 HTML 并且可以看到:
<colgroup class="tablesorter-colgroup">
<col style="width: 8.5%;">
<col style="width: 9.8%;">
<col style="width: 7.6%;">
<col style="width: 6.8%;">
<col style="width: 22%;">
<col style="width: 8.6%;">
<col style="width: 9.2%;">
<col style="width: 12.9%;">
<col style="width: 14.1%;">
</colgroup>
所有浏览器的来源都是一样的,虽然这在 Firefox 中是一样的,firefox 没有报告任何问题并且一切正常,但这对我来说看起来不对,为什么没有关闭 'col' 标签?
这是我对 tablesorter 的调用:
$(objLocTable).tablesorter({theme:'blue'
,showProcessing:true
,widthFixed:false
,widgets:['zebra'
,'scroller']
,widgetOptions:{scroller_fixedColumns:2
,scroller_height:400
,scroller_upAfterSort:true
,scroller_jumpToHeader:true}})
.tablesorterPager({container:$('.pager')});
我追踪到函数 'sortNatural' 中的一个错误,如果 a 或 b 不是字符串,则例程错误,但没有错误处理,因此排序未完成。
我无法告诉您为什么 a 或 b 不是字符串,查看它们应该是的数据集,但单步调试显示其中一个参数为空,这搞砸了功能。
我已经通过用 try / catch 子句包围函数内容解决了这个问题。
根据 WHATWG HTML Living Standard & the HTML w3.org HTML5 定义,<col>
标签 没有结束标签。
Tag omission in text/html: No end tag.
为了解决这个问题,将 tablesorter 的 widthFixed
option 保留为 false
(默认设置),并使用 CSS - target class names in the header,或在 css.
中使用 nth-child
哦,你可以 report this issue to IE。
我在客户端系统(版本 11.0.9600.18161)和 Chrome(版本 50.0.2661.102 m)的 IE11 上使用 jquery 表格排序器,表格不会按在 IE 中查看控制台后,单击 header,我看到:
HTML1509: Unmatched end tag.
我查看了生成 HTML 并且可以看到:
<colgroup class="tablesorter-colgroup">
<col style="width: 8.5%;">
<col style="width: 9.8%;">
<col style="width: 7.6%;">
<col style="width: 6.8%;">
<col style="width: 22%;">
<col style="width: 8.6%;">
<col style="width: 9.2%;">
<col style="width: 12.9%;">
<col style="width: 14.1%;">
</colgroup>
所有浏览器的来源都是一样的,虽然这在 Firefox 中是一样的,firefox 没有报告任何问题并且一切正常,但这对我来说看起来不对,为什么没有关闭 'col' 标签?
这是我对 tablesorter 的调用:
$(objLocTable).tablesorter({theme:'blue'
,showProcessing:true
,widthFixed:false
,widgets:['zebra'
,'scroller']
,widgetOptions:{scroller_fixedColumns:2
,scroller_height:400
,scroller_upAfterSort:true
,scroller_jumpToHeader:true}})
.tablesorterPager({container:$('.pager')});
我追踪到函数 'sortNatural' 中的一个错误,如果 a 或 b 不是字符串,则例程错误,但没有错误处理,因此排序未完成。
我无法告诉您为什么 a 或 b 不是字符串,查看它们应该是的数据集,但单步调试显示其中一个参数为空,这搞砸了功能。
我已经通过用 try / catch 子句包围函数内容解决了这个问题。
根据 WHATWG HTML Living Standard & the HTML w3.org HTML5 定义,<col>
标签 没有结束标签。
Tag omission in text/html: No end tag.
为了解决这个问题,将 tablesorter 的 widthFixed
option 保留为 false
(默认设置),并使用 CSS - target class names in the header,或在 css.
nth-child
哦,你可以 report this issue to IE。