javascript - store newline character with string in a variable -
i have stored string in xml ... reading in ariabel , printing below code
$("#"+obj.id +" .fronttext").html("<h2>"+ftitle[origimg]+"</h2>"+"<br/>"+backtext[origimg]);
i want print newline in backtext . how thid tried \n,
bute not working.
code::
<backtxt>harbourfront tower 1 18-storey office buillding houses many blue-chip multinational corporations. developed part of harbourfront precinct rejuvenation project meet growing demand of businesses relocating fringe of cbd. development located near supporting amenities , public transport. </backtxt>
i want print :
harbourfront tower 1 18-storey office buillding houses many blue-chip multinational corporations.
developed part of harbourfront precinct rejuvenation project meet growing demand of businesses relocating fringe of cbd. development located near supporting amenities , public transport.
you outputting html code , html uses <br>
denote line break, need output.
Comments
Post a Comment