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

相关文章:

  • 2021-11-19
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-10
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
相关资源
相似解决方案