开发者

Maintaining Line Breaks Through Facebook API Usage

When using the api and javascript to display the description of an event, h开发者_如何学运维ow can i preserve the line breaks?

query.wait(function(rows) {

document.getElementById('debug').innerHTML =
    new Date(rows[0].start_time * 1000) +  "<br />" +
    rows[0].start_time +  "<br />" +
    rows[0].end_time +  "<br />" +
    rows[0].location +  ", " +
    rows[0].venue['street'] +
    rows[0].venue['city'] + ", " +
    rows[0].venue['state'] +  "<br />" +
    rows[0].description;


;

});


You can use a <pre> element to preserve white space characters, such as \t and \n.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜