-1

how to clear all of document text with java script ?
I tried this but this code clear only body element :

document.body.innerHTML="";

1 Answers1

0

simply you can use

document.body.innerText = '';

to remove the entire page text

chandu
  • 2,276
  • 3
  • 20
  • 35