标签:
function maxsize(str,max){ var trueleight = ‘‘; if(str.length > max){ trueleight = str.substring(0,max) + ‘...‘; }else{ trueleight = str; } return trueleight; }
截取字符串方法
原文地址:http://www.cnblogs.com/vscss/p/5732393.html