<html>
<style>
.myStyle {
background-color: coral;
padding: 16px;
}
</style>
<body>
<h1>Element 对象</h1>
<h2>className 属性</h2>
<div id="myDIV" class="myStyle">
<p>我是 myDIV。</p>
</div>
<p>"myDIV" 的 class 属性值是:</p>
<p id="demo"></p>
<script>
let value = document.getElementById("myDIV").className;
document.getElementById("demo").innerHTML = value;
</script>
</body>
</html>