<html>
<style>
.myStyle {
background-color: coral;
padding:16px;
}
</style>
<body>
<h1>DOMToken 对象</h1>
<h2>remove() 方法</h2>
<button onclick="myFunction()">删除</button>
<p>请单击“删除”,从 myDIV 中删除“myStyle”类。</p>
<div id="myDIV" class="myStyle">
<p>我是 myDIV。</p>
</div>
<script>
function myFunction() {
document.getElementById("myDIV").classList.remove("myStyle");
}
</script>
</body>
</html>