取指定长度的字符串(包括中英文),以"..."的方式显示

InfoZone={   
    getShow:function(str)
    {
        if(str.getBytes() <= 42)
        {
            return str;
        }
        str = str.getLeftStr(40,".");
        return str;
    }

}

posted on 2010-10-27 19:27  伊伦  阅读(171)  评论(0编辑  收藏  举报

导航