Alert box (dialog) with line-breaks : Dialog : Window Browser JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Window Browser » Dialog »

 

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>




           
       



-

1 Comments

anan

Thursday 14th of May 2009

i tried the example and it does not work the way it is shown, the result i am getting is Line1 nLine2 http://www.navioo.com/javascript/dhtml/Alert_box_dialog_with_linebreaks_5253.html

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Window Browser
» Dialog