65
rated 0 times
[
70]
[
5]
/ answers: 1 / hits: 58485
/ 13 Years ago, wed, november 9, 2011, 12:00:00
How can I replace HTML <BR> <BR/> or <BR />
with new line character n
More From » html
How can I replace HTML <BR> <BR/> or <BR />
with new line character n
You're looking for an equivilent of PHP's nl2br()
. This should do the job:
function br2nl(str) {
return str.replace(/<brs*/?>/mg,"n");
}