Document write() Method - Write some text directly to the HTML document, with a new line using <br> - Javascript DOM

Javascript examples for DOM:Document write

Description

Document write() Method - Write some text directly to the HTML document, with a new line using <br>

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<script>
document.write("Hello World! <br>");
document.write("Have a nice day!");
</script>/*from  w  ww  . java  2 s .c om*/

</body>
</html>

Related Tutorials