Why come empty arrays?

Can't understand why getElementById everything works but if I write instead of id class
we come empty arrays

<div class="fonForm"></div>
 <div class="divClassForm fonForm divWindow" >
 <form action="" >

 <div class="styleClouse ">
 <div class="div_styleClouseOne"></div>
 <div class="div_styleClouseTwo"></div>
 <p>to request a call back</p>
 <!-- <span class="close">&times;</span> -->
 <input type="text" placeholder="Your name" class="texName">
 <input type="text" placeholder="Your phone number" class="textNumbre">
 <input type="submit" value="Oduvil request a call" class="btnForm" >

<code lang="javascript">
let divClassForm = document.getElementsByClassName("divWindow");

let block = document.getElementsByClassName("idBtnForm");
let clouse = document.querySelector(".styleClouse");
let fonForm = document.querySelector(".fonForm");

block.onclick = function() {
 divClassForm.style.display = "block";
 fonForm.style.display = "block";
clouse.onclick = function() {
 divClassForm.style.display = "none";
 fonForm.style.display = "none";


April 3rd 20 at 18:25
2 answers
April 3rd 20 at 18:27
let divClassForm = document.getElementsByClassName(".divWindow");

why does the dot in the class name of the item, if you are applying to the class?
without it is also not working - Adolphus.Schoen commented on April 3rd 20 at 18:30
April 3rd 20 at 18:29
div class="divClassForm fonForm" class="divWindow"
Two of the attribute class

Find more questions by tags JavaScriptHTML