Forum Moderators: open

Message Too Old, No Replies

Is there a newline character in javascript?

         

sublimity

12:37 am on Jul 30, 2007 (gmt 0)

10+ Year Member



I'm trying to use a mailto action in a form. In the process of trying to get IE to produce body text, I am writing a function in javascript that will produce the body text for the email using variable values for the form data. Is there a newline character that javascript uses that will create a new line in the browser's body portion of the email?

john_k

1:01 am on Jul 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



\n

As in

document.write('This is line 1.\nThis is line 2.');