Forum Moderators: open
So how about:
document.write(
'line1'
+'line2'
+'line3'
)
If you really want linebreaks in the code, either:
document.write(
'line1' + '\n'
+'line2' + '\n'
+'line3' + '\n'
)
..or use a single string, and escape the linebreak in the input.
document.write(
'line1\
line2\
line3'
)
This can be fiddly, so it may not be worth it.