title: Simple calculator in html/javascript
body: <p>I'm trying to make a calculator with html and JavaScript. After clicking on the button i'm trying to insert the number into my div. When i do so the default '0' disappears and it does not insert anything at all. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    function copy(event) {
          var newValue = event.target.value;
          document.querySelector("#display").innerHTML = newValue;
      }
  
      var textfield = document.querySelector("#btn_7");
      textfield.addEventListener("click", copy);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  
  &lt;div id="frame"&gt;
    &lt;div id="display"&gt;0&lt;/div&gt;
    &lt;button id="btn_7"&gt;7&lt;/button&gt;
    &lt;button id="btn_8"&gt;8&lt;/button&gt;
    &lt;button id="btn_9"&gt;9&lt;/button&gt;
    &lt;button id="btn_div"&gt;/&lt;/button&gt;
    &lt;button id="btn_4"&gt;4&lt;/button&gt;
    &lt;button id="btn_5"&gt;5&lt;/button&gt;
    &lt;button id="btn_6"&gt;6&lt;/button&gt;
    &lt;button id="btn_prod"&gt;*&lt;/button&gt;
    &lt;button id="btn_1"&gt;1&lt;/button&gt;
    &lt;button id="btn_2"&gt;2&lt;/button&gt;
    &lt;button id="btn_3"&gt;3&lt;/button&gt;
    &lt;button id="btn_min"&gt;-&lt;/button&gt;
    &lt;button id="btn_clear"&gt;C&lt;/button&gt;
    &lt;button id="btn_0"&gt;0&lt;/button&gt;
    &lt;button id="btn_eq"&gt;=&lt;/button&gt;
    &lt;button id="btn_plus"&gt;+&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>If I add a string to newValue variable it shows in my div. So it means like when I press on the button it doesnt give anything to the div. Is there a way to solve this? </p>
  
  <p>And about <code>var textfield = document.querySelector("#btn_7");</code></p>
  
  <p>For now I have to make this for each button and thats will take a lot of rows is there a better way to do so?</p>