title: How to calculate two numbers, but also get the result from a calculate button
body: <p>I want to do something similar that has been done a lot before, just with a little twist. I want to create 2 input fields where I find the result of a calculation by pressing a calculate button after I've written down what I need to write. I'm able to +,-,*, and /. The thing is, I'm able to make a code where when I push on these symbols, the answer will come. But what if I don't want the answer to come when I click on the symbols, but rather a calculate button? How do I do that? Please don't write your own code that is completely different than mine. And don't help if you don't know how to (although I appreciate you want to help). There is something here I don't understand. Please tell me what I'm doing wrong and why.  Here is my code.</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 kalkuler() {
  
    document.getElementById('pluss').onclick;
    document.getElementById('minus').onclick;
    document.getElementById('gange').onclick;
    document.getElementById('dele').onclick;
    document.getElementById('btnKnapp').onclick;
  
    var boks1 = parseInt(document.getElementById('txtBoks1').value);
    var boks2 = parseInt(document.getElementById('txtBoks1').value);
  
    document.getElementById('utskrift').innerHTML;
  
  
    function pluss() {
      document.getElementById('utskrift').value = boks1 + boks2;
    }
  
    function minus() {
      document.getElementById('utskrift').value = boks1 - boks2;
    }
  
    function gange() {
      document.getElementById('utskrift').value = boks1 * boks2;
    }
  
    function dele() {
      document.getElementById('utskrift').value = boks1 / boks2;
    }
  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Tall 1:&lt;input id="txtBoks1" type="text" name="txtBoks1" /&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;select name="regnetegn"&gt;
    &lt;option id="pluss" value="pluss" name="+"&gt;+&lt;/option&gt;
    &lt;option id="minus" value="minus" name="-"&gt;-&lt;/option&gt;
    &lt;option id="gange" value="gange" name="*"&gt;*&lt;/option&gt;
    &lt;option id="dele" value="deling" name="/"&gt;/&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;br&gt;&lt;br&gt; 
  
  Tall 2:&lt;input id="txtBoks2" type="text" name="txtBoks2" /&gt;
  
  &lt;br&gt;&lt;br&gt;
  
  &lt;button onclick="kalkuler" id="btnKnapp" type="button"&gt;Kalkuler&lt;/button&gt;
  
  &lt;p id="utskrift"&gt;&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>