Mega Code Archive

 
Categories / JavaScript DHTML / Window Browser
 

Alert box (dialog) with line-breaks

<html> <head> <script type="text/javascript"> function disp_alert(){     alert("Line 1" + '\n' + "Line 2") } </script> </head> <body> <form> <input type="button" onclick="disp_alert()" value="Display alert box"> </form> </body> </html>