开发者

how to get newline from server through ajax as javascript and execute it in client?

开发者 https://www.devze.com 2022-12-31 09:09 出处:网络
i am getting reply from server开发者_如何学Python as xyz.innerHTML=\'blah blah\'; in blah blah i want to send newline and it should be displayed as new line in html.

i am getting reply from server开发者_如何学Python as xyz.innerHTML='blah blah'; in blah blah i want to send newline and it should be displayed as new line in html. what i have to do? please help.


i am getting reply from server as xyz.innerHTML='blah blah'; in blah blah i want to send newline and it should be displayed as new line in html. what i have to do? please help.

Add <br /> to it:

xyz.innerHTML='blah blah<br />';

Note: You can add the <br /> from server-side script too.

0

精彩评论

暂无评论...
验证码 换一张
取 消