Mega Code Archive

 
Categories / JavaScript Tutorial / Language Basics
 

Define message in one block and output it in another

< html> <head> <title>Define message in one block and output it in another</title> <script language="javascript" type="text/javascript"> <!-- var msg  = "Message in javascript"; //--> </script> </head> <body> <h1>Define message in one block and output it in another</h1> <script language="javascript" type="text/javascript"> <!-- document.write("<P>" + msg + "</p>"); //--> </script> </body> </html>