title: if selected abc in select element how happen abc group items in second select element
body: <p>there are two select element. if abc value is selected in the first select element abc group items happen in second select element. </p>
  
  <p>I want to do this. This how to make ?</p>
  
  <pre><code>&lt;select id="bolum" onChange="giveSelection(this.value)"&gt;
    &lt;option value="bp"&gt;bp&lt;/option&gt;
    &lt;option value="mv"&gt;mv&lt;/option&gt;
  &lt;/select&gt;
  &lt;select id="ders"&gt;
    &lt;option data-option="bp"&gt;gorsel&lt;/option&gt;
    &lt;option data-option="bp"&gt;internet&lt;/option&gt;
    &lt;option data-option="mv"&gt;vergi&lt;/option&gt;
    &lt;option data-option="mv"&gt;maths&lt;/option&gt;
  &lt;/select&gt;
  
  
  var bolum = document.querySelector('#bolum');
  var ders = document.querySelector('#ders');
  var options2 = ders.querySelectorAll('option');
  
          function giveSelection(selValue) {
  
              ders.innerHTML='';
  
              for(var i = 0; i &lt; options2.length; i++) 
                {
                  if(options2[i].dataset.option === selValue) 
                  {
                    ders.appendChild(options2[i]);
                  }
                }
          }
  
  giveSelection(bolum.value);
  </code></pre>