title: JavaScript Calculator problems
body: <p>I am messing a bit with JavaScript and decided to make a calculator. For now all I want it to do is to input what button was pressed into Answer box, but I can't make it to work, I think something is wrong with my functions, but I can't figure out what, please help...</p>
  
  <p><div class="snippet" data-lang="js" data-hide="true">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;body&gt;
  
    &lt;script&gt;
      var one = function() {
        document.getElementById("input").innerHTML = "1"
      }
  
      function two() {
        document.getElementById("input").innerHTML = "2"
      }
  
      function three() {
        document.getElementById("input").innerHTML = "3"
      }
  
      function four() {
        document.getElementById("input").innerHTML = "4"
      }
  
      function five() {
        document.getElementById("input").innerHTML = "5"
      }
  
      function six() {
        document.getElementById("input").innerHTML = "6"
      }
  
      function seven() {
        document.getElementById("input").innerHTML = "7"
      }
  
      function eight() {
        document.getElementById('input').innerHTML = "8"
      }
  
      function nine() {
        document.getElementById('input').innerHTML = "9"
      }
  
      function zero() {
        document.getElementById('input').innerHTML = "0"
      }
  
      function minimum() {
        document.getElementById('input').innerHTML = "&lt;"
      }
  
      function maximum() {
        document.getElementById('input').innerHTML = "&gt;"
      }
  
      function add() {
        document.getElementById('input').innerHTML = "+"
      }
  
      function substract() {
        document.getElementById('input').innerHTML = "-"
      }
  
      function multiply() {
        document.getElementById('input').innerHTML = "*"
      }
  
      function divide() {
        document.getElementById('input').innerHTML = "/"
      }
  
      function calculate() {}
  
      function reset() {}
    &lt;/script&gt;
  
    &lt;table border="1"&gt;
      &lt;tr&gt;
        &lt;td colspan="4"&gt;
          &lt;table border="1"&gt;
            &lt;tr&gt;
              &lt;td&gt;
                &lt;input type="text" value="Answer" id="input"&gt;
              &lt;/td&gt;
            &lt;/tr&gt;
          &lt;/table&gt;
        &lt;/td&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;input type="button" value="1" onclick="one()"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="2" onclick="two()"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="3" onclick="three()"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="+" onclick="add()"&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
  
        &lt;tr&gt;
          &lt;td&gt;
            &lt;input type="button" value="4" onclick="four()"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="5" onclick="five()"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="6" onclick="six()"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="- " onclick="substract()"&gt;
          &lt;/td&gt;
  
        &lt;/tr&gt;
  
        &lt;tr&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="7" onclick="seven"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="8" onclick="eight"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="9" onclick="nine"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="* " onclick="multiply()"&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
  
        &lt;tr&gt;
          &lt;td&gt;
            &lt;input type="button" value="&lt;" onclick="minimum"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="0" onclick="zero"&gt;
          &lt;/td&gt;
          &lt;td&gt;
            &lt;input type="button" value="&gt;" onclick="maximum"&gt;
          &lt;/td&gt;
          &lt;td&gt;
            &lt;input type="button" value="/ " onclick="divide()"&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
  
        &lt;tr&gt;
          &lt;td colspan="3"&gt;
            &lt;input type="button" value="      Calculate!      " onclick="calculate()"&gt;
          &lt;/td&gt;
  
          &lt;td&gt;
            &lt;input type="button" value="C" onclick="reset()"&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>