line breaks - Linebreak in a String in JavaScript -
i want make linkebreak in string. in html it's (if replace t linkebreak): mystring.replace("t", "<br>");
but doesn't work in javascript. <br>
part of string too. how implement in javascript? thanks!
mystring before linkebreak:
2013-10-22t22:56:25.534z
mystring after linebreak:
2013-10-22t
22:56:25.534z
you can achieve doing :
var mystring = "2013-10-22t22:56:25.534z"; console.log(mystring.replace("t", "\n"));
Comments
Post a Comment