+ 1
How to stop creating elements in JavaScript
Letâs say I have a document.write(ârandom textâ); . How do I delete that element on the page?
2 RĂ©ponses
+ 3
You should use the empty character combination âââ
document.getElementById ("MyId"). InnerHTML = "";
Or document.body.innerHTML = "";
Hope to your understanding :)
@Sololearn
+ 1
document.body.innerHTML = ""