js简单算法
var textLen = text.replace(/[^\x00-\xff]/gi,'xu').length;//字节数textLen = textLen%2 == 0 ? textLen/2 : textLen/2+0.5;//字符数//1字符 = 2字节