title: Check if a button Is clicked then do something
body: <p>I have a form with tabs which include buttons. Before the user clicks next, I want to check if at least one or all the buttons have been clicked, if clicked, the next tab shows up. If not, an alert pops up!</p>
  
  <pre><code>&lt;button class="btns rem" id="mon"&gt;morning&lt;/button&gt;
  &lt;button class="btns rem" id="oo" &gt;afternoon&lt;/button&gt;
  &lt;button class="btns rem" id="pp" &gt;night&lt;/button&gt;
  &lt;button class="btns" id="day" &gt;Next&lt;/button&gt;
  
   &lt;script type="text/javascript" &gt;
      document.getElementById("day").onclick = 
       function(event) {
      var btn= 
        document.getElementsByClassName("btns") ;
          for(x=0; x&lt;btn.length; x++){
      if(btn[x].click == true){
          prompt("open Next page?");
                } 
          else {
         alert("please click at least one button");
      } 
     } 
  
   &lt;/script&gt;
  </code></pre>