+ 1
How to clear content on a page
How do you clear content on a page
2 Answers
+ 4
You mean delete or hide all element of html you can use
var a = document. getElementsByTagName("body");
a.innerHTML=0;
or you can use jQuery. It will more better
var a = $("body");
a.hide();
but you have to add a line in head element
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
correct me If I understand your question in wrong way.
+ 4
simply do document.write( " ");
it is used for writing anything. if you erase and rewrite then that's it. use the things inside it to the things you want to be writtenon the screen