在博客上找有些知識可真是太難了TAT
下面看實現的代碼
<html>
<head>
<script>
function a() {
var div = document.getElementById("d1");
div.style.display = "block";
}
</script>
</head>
<body>
<div id="d1" style=
"display:none;
width:500px;
height:100px;
border:1px solid;
">
我是出現的內容
</div>
<div>
<button type = "button" onclick="a()">點擊出現</button>
</div>
</body>
</html>