Friday, 18 November 2011

Start New Line in JavaScript alert box

How to start New Line in JavaScript alert box?

Code:

 \n is used to start with new line.

alert("Your message successfully sent.\nThanks for contacting.");
 
output:
 
Your message successfully sent.
Thanks for contacting. 

 

No comments:

Post a Comment