div.innerHTML.replace("<p></p>",""); does not work
I wanted to replace on a given webpage ALL empty paragraphs
or (mind the blank!)
by nothing. Therefore I coded:
var div = document.getElementById("foobar");
div.innerHTML = div.innerHTML.replace("<p></p>","");
....but it doesn't work.
What do I have to change?
Furthermore I guess only the first occurence is changed. How do I replace ALL occurencies?