- 1

How can i add text without changing anything else?

5th Nov 2019, 2:22 AM
Zackery Spry
4 Respostas
+ 2
What do you mean? Give more details/be more specific. Better yet, give an example of what you want to do and what’s preventing you from doing that right now.
5th Nov 2019, 3:13 AM
Jason Stone
Jason Stone - avatar
+ 1
do document.querySelector(“#myDivID”).innerHTML += “the text I want to add” it will add text to the end of the content inside the div. For example, if I put <div id=“example”>Text is here!</div> and then ran document.querySelector(“#example”).innerHTML += “ More text is here!” I would then have a div with “Text is here! More text is here!” in it.
5th Nov 2019, 10:58 PM
Jason Stone
Jason Stone - avatar
0
I would like to add text without clearing anything or changing anything. This also needs to be inside a script inside a div. Also, it needs to work like document.write.
5th Nov 2019, 9:01 PM
Zackery Spry
0
Thanks
5th Nov 2019, 11:48 PM
Zackery Spry