<!DOCTYPE html>
<html>
<head>
<style>
.class1 {
width: 300px;
height: 50px;
background-color: #1c87c9;
color: #e6ebef;
font-size: 25px;
text-align: center;
padding: 5px;
}
</style>
</head>
<body>
<p>Klicken Sie auf den Button, um "class1" von Div zu entfernen.</p>
<button onclick="myFunction()">Klicken</button>
<p><strong>Hinweis:</strong> DieEigenschaft classList wird in Internet Explorer 9 und früheren Versionen nicht unterstützt.</p>
<div id="myDiv" class="class1">
Ich bin ein Div Element.
</div>
<script>
function myFunction() {
document.getElementById("myDiv").classList.remove("class1");
}
</script>
</body>
</html>