获得宽度:
var tableAutoWidth = $('.dataTable_wrapper').width();
if (tableAutoWidth < 1200) {
tableAutoWidth = 1200;
}
设置表格宽度:
$('#table').width(tableAutoWidth);
再将scrollX设为true即可

相关文章:

  • 2022-12-23
  • 2022-01-28
  • 2021-12-21
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2021-09-23
猜你喜欢
  • 2021-08-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-12-29
相关资源
相似解决方案