1.使用CSS实现,给此单元格添加一个Class:

width:130px;
display:block;
overflow:hidden;
word-break:keep-all;
white-space:nowrap;
text-overflow:ellipsis;

2.使用JQuery实现,表格:

$("[id='projectName']").each(function(){
                var _self = $(this);
                var text = _self.text();
                text = text.substring(0,15) + "...";
                _self.html(text);
            });

 

相关文章:

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