没什么问题啊,应该是你html代码部分有问题的,下附正确代码,已测试:
<script type="text/javascript">
function load() {
document.getElementById("top").style.display = "";
document.getElementById("bottom").style.display = "";
}
function close() {
document.getElementById("top").style.display = "none";
document.getElementById("bottom").style.display = "none";
}
</script>
<div id="top" style="width:100px;height:100px;background:#666;"></div>
<div id="bottom" style="width:100px;height:100px;background:#666;"></div>
<input id="Button1" type="button" value="button" onclick="load()" />
<input id="Button2" type="button" value="button" onclick="close()" />