<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
let exmpale = document.createElement("div");
exmpale.innerHTML = "aaaaa";
exmpale.className = "classDiv";
document.getElementsByClassName("myDIV").appendChild(exmpale);
}
</script>
</head>
<body>
<div class="myDIV">
A DIV
</div>
<button onclick="myFunction()">button</button>
</body>
</html>
I don’t know why but when I'm clicking the button it doesn't print out the value inside the innerHTML
(aaaaa).