开发者

jQuery new line \n [duplicate]

This question already has answers here: Cl开发者_运维技巧osed 11 years ago.

Possible Duplicate:

What's the cleanest way to write a multiline string in JavaScript?

How does one go onto a new line in writing jQuery code not the actual output of the code, for example:

$('#foo').append('<div id="bla"> '+\n+'
                  </div>');

Something like that.


$('#foo').append('<div id="bla"> \
                 </div>');

The slash (\) escapes the newline, allowing the string to span multiple lines

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜