jquery 判断字符串长度
function titleLength(str) { var strLength = 0; var list = str.split(""); for (var i = 0; i < list.length; i++) { if (str.charCodeAt(i) > 0 && str.charCodeAt(i) < 128) strLength = strLength + 0.5; else strLength = strLength + 1; } return strLength; }