截取字符串方法
function maxsize(str,max){ var trueleight = ''; if(str.length > max){ trueleight = str.substring(0,max) + '...'; }else{ trueleight = str; } return trueleight; }
posted on 2016-08-03 12:32 jasonduanmu 阅读(123) 评论(0) 编辑 收藏 举报
function maxsize(str,max){ var trueleight = ''; if(str.length > max){ trueleight = str.substring(0,max) + '...'; }else{ trueleight = str; } return trueleight; }
posted on 2016-08-03 12:32 jasonduanmu 阅读(123) 评论(0) 编辑 收藏 举报