attachEvent ,addEventListener

            if (window.attachEvent) { 
                window.attachEvent("onload", remove); 
            } else if (window.addEventListener) { 
                window.addEventListener("load", remove, false);   
            }             
            function remove() { 
                var div = document.getElementById("divprogressbar"); 
                document.body.removeChild(div); 
            }

原文地址:https://www.cnblogs.com/sunrise/p/3484149.html