After clicking on (click me) button it shows the result but rest of the all disappear | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

After clicking on (click me) button it shows the result but rest of the all disappear

Please help me🥺🙏🙏 https://code.sololearn.com/W2DBRGf2t6uI/?ref=app

15th Nov 2022, 11:06 AM
Sakshyam kharel
2 Answers
+ 1
It is because of the method you are using. "document.write()" deletes everything in HTML: https://www.w3schools.com/jsref/met_doc_write.asp
15th Nov 2022, 11:43 AM
Justice
Justice - avatar
0
Do you have any solution please 🥺🙏🙏
16th Nov 2022, 1:36 AM
Sakshyam kharel