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
1 Answer
Reset to default 4You can escape it with \n
or \u000A
, see:
How do I break a string across more than one line of code in JavaScript?