jquery - How to stop Ajax append from removing text format (line breaks & spaces) -


I am trying to embed a text document into an HTML document.

The text document I used to embed Ajax, however, the formatting has been removed.

What can I do to keep the text document the same?

  & lt; Div class = "notepad" & gt; & Lt; / Div & gt; & Lt; Script & gt; $ .ajax ({async: incorrect, url: "approx .. equals", success: function (data) {$ ("notepad"). Attachment (data);}}); & Lt; / Script & gt;  

Try using the data type as HTML

< Pre> & lt; Div class = "notepad" & gt; & Lt; / Div & gt; & Lt; Script & gt; $ .ajax ({async: incorrect, url: "approx .. equals", datatype: "html", success: function (data) {$ ("notepad"). Attachment (data);}}) ;


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -