admin管理员组

文章数量:1318156

Is there a way to encode a line break into a string without using any HTML entities or tags? Specifically, I would like a string that I pass into the dojox.gfx renderer to display a line break.

Is there a way to encode a line break into a string without using any HTML entities or tags? Specifically, I would like a string that I pass into the dojox.gfx renderer to display a line break.

Share Improve this question asked Jul 25, 2012 at 19:52 allenylzhouallenylzhou 1,4614 gold badges19 silver badges36 bronze badges 1
  • usually \n is the charachter representing a line break, but I don't know dojox.gfx – Naigel Commented Jul 25, 2012 at 19:55
Add a ment  | 

1 Answer 1

Reset to default 4

You can escape it with \n or \u000A, see:

How do I break a string across more than one line of code in JavaScript?

本文标签: javascriptEncoding a line break in a string without using HTMLStack Overflow