Newline problem when writing to HTML using JavaScript

后端 未结 4 2151
逝去的感伤
逝去的感伤 2021-01-21 14:03

I\'m using regular textbox as a text input where the users wrties their comments. I then use JQuery and JSON to send data to the server and then insert it into

4条回答
  •  Happy的楠姐
    2021-01-21 14:37

    where do you want to display the text? in a textarea or directly on the page?

    if on the page you'll have to convert the newlines to
    tags when getting the text from the db and printing it to the page.

提交回复
热议问题