有没有人比显而易见的解决方案/库更复杂的解决方案/库,用于使用JavaScript截断字符串并在末尾添加省略号:
if(string.length > 25) {
string = string.substring(0,24) + "...";
}
婷婷同学_
相关分类