IE支持原生交换两行的位置

在IE的table,tbody,thead, tfoot中,它们都支持一个叫moveRow(indexToMove, destinationIndex)的API,第一个参数要移去的行号,第二个参数为当前的行号,行号即为rowIndex。有了,我们就可以简捷地交换两行位置,而不需要冗长的insertBefore(它还要根据是上移下是下移,修改参数呢)。

原文地址:https://www.cnblogs.com/rubylouvre/p/2040270.html