Document write() Method - Write HTML elements with text directly to the HTML document: - Javascript DOM

Javascript examples for DOM:Document write

Description

Document write() Method - Write HTML elements with text directly to the HTML document:

Demo Code

ResultView the demo in separate window

<!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>

Related Tutorials