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);
}
或者也可以用
if (document.all){window.attachEvent('onload',remove)}//IE
else{window.addEventListener('load',remove,false);} //FireFox