Javascript examples for DOM:Document write
Document write() Method - Write HTML elements with text directly to the HTML document:
<!DOCTYPE html> <html> <body> <script> document.write("<h1>Hello World!</h1><p>Have a nice day!</p>"); </script>/*from www . jav a2 s . co m*/ </body> </html>