+ 3

How unique is the tag document.write() in JS?

I want to where to use and how to use document.write() in an HTML DOCUMENT and how different does it work apart from the HTML tags. I have this doubt coz document.write() and other elements in HTML display the words we type but the content in HTML appears before JavaScript so if anyone knows something about it help me please! šŸ˜€ Cheers People! Keep Coding and Developing ā¤ļøšŸ‘ŠšŸ»

31st Jan 2018, 11:54 AM
Raaja Thalapathy
Raaja Thalapathy - avatar
2 Answers
+ 1
You donā€™t use document.write() with your current html document. You can use it after document.open() method to write into the stream. To display content in the stream call document.close() method but again this will clear you current document.
31st Jan 2018, 12:25 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
Cool got a hold to it now thanks mate ! šŸ˜šŸ‘šŸ»
31st Jan 2018, 1:29 PM
Raaja Thalapathy
Raaja Thalapathy - avatar