开发者

Maintaining Line Breaks Through Facebook API Usage

开发者 https://www.devze.com 2023-03-30 02:39 出处:网络
When using the api and javascript to display the description of an event, h开发者_如何学运维ow can i preserve the line breaks?

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

精彩评论

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