This is a common problem with IE. It is annoying but manageable.
If document.body.appendChild is executed in the body tag before closing the body, IE6 simply will not load the page. 7 and 8 will wait for the page to load
So, how to approach this problem?
- Wait for the body to load using body.onload .
- add an element to another element instead of the body tag.
I recommend the second option. Adding elements to another target element will preserve the intended behavior and will not change the way you add your elements to the site.
source share