Mega Code Archive

 
Categories / JavaScript Tutorial / Document
 

Use document write() to output the HTML tags

< html> <head> <title>Writing HTML</title> </head> <body> <script language="javascript" type="text/javascript"> <!-- document.write("<h1>Writing HTML</h1>"); var myPara  = "<P> para </p> ";     myPara += "<P><B>document object's write() method!</B></p>"; window.document.write(myPara); //--> </script> </body> </html>