Creating your first JavaScript part 2
Output
Let's use JavaScript to print "Hello World" to the browser.
The document.write() function writes a stringinto our HTML document. This function can be used to write text, HTML, or both.
The above code displays the following result:
The document.write() method should be used only for testing. Other output mechanisms appear in the upcoming lessons.
Please type in a code to output the "Hello world!" text on the screen.
<script>
("Hello world!");
</script>
document.
Write</script>
Comments
Post a Comment