开发者

jQuery new line \n [duplicate]

开发者 https://www.devze.com 2023-03-10 08:38 出处:网络
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?
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

精彩评论

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