function getStrLength(str) { var cArr = str.match(/[^\x00-\xff]/ig); return str.length + (cArr == null ? 0 : cArr.length); }
原标题:JS验证字符长度
关键词:JS