title: Need to get simple calculation answer when action is selected from options
body: <p>I have dropdown menu where I can choose an action. I need that after I select my action and put my numbers in there would be answer shown at the bottom. I created functions for each action, but I don't know how to make it work.
  Also, it should show, that I can't divide if the second number is equal to 0.</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-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
   &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;link type="text/css" rel="stylesheet" href="stilius.css"&gt;
   &lt;/head&gt;
  
   &lt;body&gt;
    &lt;form&gt;
     &lt;div id="pavadinimas"&gt;
      Operacija
     &lt;/div&gt;
   
     &lt;label&gt;
      &lt;select&gt;
       &lt;option&gt;Sudėtis&lt;/option&gt;
       &lt;option&gt;Atimtis&lt;/option&gt;
       &lt;option&gt;Daugyba&lt;/option&gt;
       &lt;option&gt;Dalyba&lt;/option&gt;
      &lt;/select&gt;
     &lt;/label&gt;
  
     &lt;label&gt;
      &lt;div class="text"&gt;1 skaičius&lt;/div&gt;
      &lt;input id="pirmasSkaicius" type=number placeholder="Pirmas skaičius"&gt;&lt;/input&gt;
     &lt;/label&gt;
  
     &lt;label&gt;
      &lt;div class="text"&gt; 2 skaičius&lt;/div&gt;
      &lt;input id="antrasSkaicius" type=number placeholder="Antras skaičius"&gt;&lt;/input&gt;
     &lt;/label&gt;
  
      &lt;b&gt;Rezultatas:&lt;/b&gt; 
      &lt;span id="rezultatas"&gt;&lt;/span&gt;
    &lt;/form&gt;
   &lt;/body&gt;
   
   &lt;script&gt;
    function sudetis(){
     1sk = document.getElementById("pirmasSkaicius").value;
     2sk = document.getElementById("antrasSkaicius").value;
     document.getElementById("rezultatas").innerHTML = 1sk + 2sk;
    }
    
    function atimtis(){
     1sk = document.getElementById("pirmasSkaicius").value;
     2sk = document.getElementById("antrasSkaicius").value;
     document.getElementById("rezultatas").innerHTML = 1sk - 2sk;
    }
    
    function daugyba(){
     1sk = document.getElementById("pirmasSkaicius").value;
     2sk = document.getElementById("antrasSkaicius").value;
     document.getElementById("rezultatas").innerHTML = 1sk * 2sk;
    }
    
    function dalyba(){
     1sk = document.getElementById("pirmasSkaicius").value;
     2sk = document.getElementById("antrasSkaicius").value;
     document.getElementById("rezultatas").innerHTML = 1sk / 2sk;
    }
   &lt;/script&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>