<script>
String.prototype.len=function()
{
return this.replace(/[^\x00-\xff]/g,"**").length;
}
var str="joycenter的字符串";
alert(str.len());
</script>
String.prototype.len=function()
{
return this.replace(/[^\x00-\xff]/g,"**").length;
}
var str="joycenter的字符串";
alert(str.len());
</script>
中文一个 两个字节
52juanjuan(Fibona) 能否举例说明wanghr100(灰豆宝宝.net) 为什么不对