You can use split()
of JavaScript
var text = "Hey There : Part 1";
var newText = text.split(":").join('\n');
alert(newText);
0
solved How to separate a line into two after “:” by using javascript? [duplicate]
You can use split()
of JavaScript
var text = "Hey There : Part 1";
var newText = text.split(":").join('\n');
alert(newText);
0
solved How to separate a line into two after “:” by using javascript? [duplicate]