开发者

how to inject line feeds into dynamically created html (javascript)

I'm creating HTML from javascript c开发者_Go百科ode.

What character(s)/escape codes should I add to the long html to cut the html into smaller lines (in the html source level, not in the rendered html result)?


You can use \n for unix/linux or \n\r for Windows.

Example:

var someString = 'Hello ' + 'Wordl\n';
someString += 'Hello ' + 'Wordl Again\n';
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜