title: JavaScript function() for buttons disabled/enabled
body: <p>I have two buttons in my HTML:</p>
  
  <pre><code>&lt;form&gt;
  &lt;input type="button"  id="button1" value="Clickable" onClick="switchButton()"&gt;
  &lt;input type="button"  id="button2" value="Not Clickable" onClick="switchButton2()" disabled="true"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to write a function() in JavaScript for when I click on button1 it should be disabled and change it's value to "not clickable" and button2 should be enabled and change it's value to "clickable" and the other way around.</p>
  
  <p>I have written two functions but they aren't correct and I am very new to JavaScript. This is my functions():</p>
  
  <pre><code>function switcher() {
  var btn = document.getElementById("knapp1");
  btn.disabled = true;
  }
  function switcher2(){
  var btn2 = document.getElementById("knapp2");
  btn2.enabled = true;
  }
  </code></pre>