Using document write method
Using document.write()
For testing our JavaScript coding on web page to use document.write() :
<!DOCTYPE
html>
<html>
<body>
<h1>My First Web Page</h1>
<p>My first paragraph.</p>
<script>
document.write(5 + 6);
</script>
</body>
</html>
<html>
<body>
<h1>My First Web Page</h1>
<p>My first paragraph.</p>
<script>
document.write(5 + 6);
</script>
</body>
</html>
demo here https://jsfiddle.net/4opd5qw2/
Comments
Post a Comment