Why is it generally not considered good practice to use document.write
in Javascript? I know it is not the most elegant or best way to do it, but are there any true errors with it? Is it ever ok? And in what case would it be better than inner.HTML
I understand that it will rewrite the document, if used after the loading. However, should I be using innerHTML
even if I am trying to rewrite the document? If so, why?
I know some have asked if I even looked at the related questions before posting; I did. But I did not find anything satisfactory.