Page 1 of 1

Unterminated Line Constant in JS

Posted: Sat Sep 04, 2004 5:14 am
by anjanesh
This is something I need to do but js wont accept:

Code: Select all

<SCRIPT LANGUAGE=Javascript>
document.write('
a
b
c
');
</SCRIPT>
Gives Unterminated Line Constant

Posted: Sat Sep 04, 2004 9:27 am
by feyd
javascript does not allow line spans. just add newlines into the string.