字符串的长度 -- js

var s = '中国人';
var s1 = 'chinaren';
alert(s.length); //3
alert(s1.length); //8

原文地址:https://www.cnblogs.com/qinqiu/p/5183496.html