title: Change image using multiple button and javascript
body: <p>I have this code from another stackoverflow question to change image using multiple SELECT and javascript:</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 swapImage(){
      var image = document.getElementById("imageToSwap");
      var color = document.getElementById("colour").value;
      var size = document.getElementById("size").value;
  
      image.src = "img/" + size + "_" + color;
  };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;img id="imageToSwap" src="img/red.png"&gt;
  
  &lt;select id="colour" onChange="swapImage()"&gt;
      &lt;option value="red.png"&gt;Red&lt;/option&gt;
      &lt;option value="green.png"&gt;Green&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id="size" onChange="swapImage()"&gt;
      &lt;option value="small"&gt;Small&lt;/option&gt;
      &lt;option value="large"&gt;Large&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>So, how to change SELECT to BUTTON?</p>
  
  <p>For example:</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 swapImage(){
      var image = document.getElementById("imageToSwap");
      var color = document.getElementById("colour").value;
      var size = document.getElementById("size").value;
  
      image.src = "img/" + size + "_" + color;
  };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;img id="imageToSwap" src="img/red.png"&gt;
  
  &lt;div id="colour" onChange="swapImage()"&gt;
    &lt;button value="red.png"&gt;Red&lt;/button&gt;
    &lt;button value="green.png"&gt;Green&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;div id="size" onChange="swapImage()"&gt;
    &lt;button value="small"&gt;Small&lt;/button&gt;
    &lt;button value="large"&gt;Large&lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  
                            </p>