我已将此字符串存储在 xml 中...在 ariabel 中读取它,然后使用以下代码打印
$("#"+obj.id +" .frontText").html("<h2>"+fTitle[origImg]+"</h2>"+"<br/>"+backText[origImg]);
我想在这个 backtext 中打印换行符。怎么办我试过\ n,
但是没有工作。
代码::
<backTxt>HarbourFront Tower One is an 18-storey office buillding which houses many blue-chip multinational corporations.
It was developed as part of the HarbourFront Precinct rejuvenation project to meet the growing demand of businesses relocating to the fringe of the CBD.
The development is located near supporting amenities and public transport.
</backTxt>
我想这样打印:
HarbourFront Tower One 是一幢 18 层高的写字楼,内设许多蓝筹跨国公司。
它是作为 HarbourFront Precinct 复兴项目的一部分而开发的,以满足搬迁到 CBD 边缘的企业不断增长的需求。该开发项目靠近配套设施和公共交通。