EarthWeb
Developer.com
Site
windows 2000
visual c++
java
visual basic
javascripts
recommend it
 
Book
thinking in java
 
Interact
forum
guest book
jobs
jokes
what's new

share code
 
Resource
add resource
modify resource
new resource
 

[Internet Jobs]
-----
Java by E-mail:

Get the weekly e-mail highlights on Java!
-----

-

Show an Alert box with new line in it


Author: Real Gagnon
Author's WebSite: http://tactika.com/realhome/realhome.html


 <SCRIPT>
 alert("line1\r\nline2\r\nline3");
 </SCRIPT>


This tip is also good for inserting new line into a TextArea.

"\r\n" stands for carriage Return and New line. On Netscape, only the \n may be necessary but with Explorer, you need both. To be compatible with both always use the combination "\r\n".


Posted On: 10-Jul-1999

internet.commerce