1: 2: 3: 4: 5: 6:
javaString = "First Line of text:" + "\n" + variable1 + " for " + variable2 + "\n"; <script language="JavaScript" > var message="<%=javaString %>"; alert(message); </script>
1: 2: 3: 4: 5: 6: 7: 8:
<% javaString = "First Line of text:" + "\\n" + variable1 + " for " + variable2 + "\n"; %> <script language="JavaScript" > var message="<%=javaString %>"; alert(message); </script>