Mega Code Archive

 
Categories / JavaScript DHTML / Window Browser
 

New line character in alert box

<html>   <head>     <title>Including a special character in a string</title>     <script type="text/javascript">         var a = "First line.\nSecond line.";                  alert("String with a newline special character: " + a);         </script>   </head>   <body>   </body> </html>