+ 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?

22nd Dec 2017, 7:36 PM
Kenzoid
Kenzoid - avatar
2 Respuestas
+ 3
You should use the empty character combination ↓↓↓ document.getElementById ("MyId"). InnerHTML = ""; Or document.body.innerHTML = ""; Hope to your understanding :) @Sololearn
22nd Dec 2017, 8:03 PM
James16
James16 - avatar
+ 1
document.body.innerHTML = ""
22nd Dec 2017, 7:52 PM
Luc Hariman Randrianomenjanahary
Luc Hariman Randrianomenjanahary - avatar