var t = "你好呀,"; var t1 = "你好呀,d"; var t2 = "你好呀,dd2"; alert(t.length); alert(t1.length); alert(t2.length); 字符串中汉字、数字、字母占得个数是一样的 来源:oschina链接:https://my.oschina.net/TAOH/blog/3175335 标签 字母