Home  >  Q&A  >  body text

javascript - Reading the page source code, all line breaks in the page are read as <br/>. How can I make it correctly parsed?

Like the question, how can it be correctly parsed into newline characters

仅有的幸福仅有的幸福2671 days ago833

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-06-26 10:51:44

    I don’t know how you get it. Wouldn’t it be ok to replace <br/> with n? str.replace(/<br/>/ig, 'n')

    reply
    0
  • Cancelreply