jquery - Javascript: Get body html in one row string. How to remove linebreaks? -
i have html
<span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 10pt;">one two:</span>
i need receive html in 1 row string.
a = $("body").clone().find("script").remove().end().html(); = a.replace("\r\n", "zzz"); = a.replace("\n", "zzz"); console.log(a);
but it's not working. same.
<span style="font-family: tahoma, arial, helvetica, sans-serif; font-size: 10pt;">one two:</span>
Comments
Post a Comment