Answers for "replace br tag in javascript"

0

javascript replace <br> with n

var str = $("#mydiv").html();
var regex = /<br\s*[\/]?>/gi;
$("#mydiv").html(str.replace(regex, "\n"));
Posted by: Guest on July-29-2020
0

how to use br tag in javascript string

var result = "First String" + " - " + "Second String" + " <br /> " + "Third String"
//and use inner html after this
Posted by: Guest on August-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language