Document.Write() Method in JavaScript

Document.Write() Method in JavaScript
Rating: 4.5 - 2 Votes

Document.Write() Method in JavaScript

JavaScriptIn JavaScript, Document.Write() method is used to write a string to the HTML document.  It takes a string as a parameter.  That string could be a plain text or a text in the form of HTML code.  Sample code for both scenarios is given below.

 

 

JavaScript Text:


HTML Code: