0
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
#b {
display: none;
}
</style>
<script type="text/javascript">
document.getElementById("b").style.display = block;
</script>
</head>
<body>
<h1 id="b">Hello</h1>
</body>
</html>
有沒有人知道我在做什麼錯在這裏?不應該通過JavaScript更改CSS並顯示Hello
。謝謝你的幫助!Javascript not change css
只要記住訪問通過'.style。