摘要: //超过长度的字符截取指定长度,超出部分以...显示 function subString(str, len) { var newLength = 0; var newStr = ""; var chineseRegex = /[^\x00-\xff]/g; var singleChar = ""; var strLength = str.replace(chineseRegex, "**").length; if (strLength > len... 阅读全文
posted @ 2013-12-30 11:07 看看我的眼神 阅读(1476) 评论(0) 推荐(0) 编辑