var div = document.getElementById("DivId");
div.style.display = "none"; //隐藏而不删除
div.parentNode.removeChild(div); //删除