title: show button when var abc = 0 else hide button
body: <p>There are similar queries but not exactly what I am looking for.</p>
  
  <p>I need to display a registration button in my html body if a var abc = 0 else hide the button.</p>
  
  <p>Could anyone help?</p>
  
  <p>Here is what I have:</p>
  
  <pre><code>    .hidden {
    display: none;
  }
  
  
  var pass=0;
    function hideButton() {
  
      var hiddeninputs = document.getElementsByClassName("hidden");
  
        if (pass = 0) {
          hiddeninputs[i].style.display= "none";
        }
        else {
          hiddeninputs[i].style.display = "block" ;
        }
  
    }
  
  
  
      &lt;form action=""&gt;
          &lt;input type="button" value="Register" onclick='window.location.href="#page2"' onload="hideButton()"&gt; &lt;br /&gt;
      &lt;/form&gt;
  </code></pre>