function replaceAll(find, replace, str) {
//find=\n replace=<br/>
//str=tyyrtu\nuiop\nuioui
try {
while (str.indexOf(find) > -1) {
str = str.replace(find, replace);
}
return str;
}
catch (e) { }
}
how to replace \n in string to
in javascript? pls help me fix this issue
`. Though not invalid, it serves no purpose, browsers are instructed to ignore it, it does nothing and is, therefore, pointless and only takes up space needlessly. – Rob May 01 '17 at 11:16