// 得到字符串的真实长度(双字节换算为两个单字节)
private function getStrActualLen(sChars:String):int
{
return sChars.replace(/[^\x00-\xff]/g,"xx").length;
}
//中文按2个字符计算
if( getStrActualLen(this.v0.text)>100)
{
Alert.show("最多输入"+(100)+"个字节,1个中文为2个字节。","提示:");
this.focusManager.setFocus(this.v0);
return;
}