<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>关闭DIV</title>
<style type="text/css">
.button-close{
cursor: pointer;
}
</style>
</head>
<body>
<div id="close" style="width: 477px; height: 477px; background-color: #ADADAD;">
<button class="button-close" onclick="javascript:turnoff('close')" title="关闭div">点击关闭</button>
</div>
</body>
<script>
function turnoff(obj){
document.getElementById(obj).style.display="none";
}
</script>
</html>