javascript - how to put ... if string length is over 12 -
facebook_user_name=facebook_info[0].url[j]; if(facebook_user_name.length>12) { }
how put ... if string length on 12. example, name aaaaaaaa bbbbbbb result should aaaaaaaa bbb... thank in advance.
var substring = facebook_user_name.substr(0, 12) + '...';
Comments
Post a Comment