var num = document.getelementbyid("id_del_objeto").maxlength Text = Text.subString(0, num-1)+' ...';