title: How do i place a list of values onto a drop down ?? (must use DOMs, no jquery)
body: <p>i'm trying to place a list of items onto a dropdown box but having little success. I have my list of items labelled MARKET, and i have a drop box using the "select" element, i've been trying all sorts of elements like .value and .option and .setAttribute but i dont know how to formulate the code using them, if there are any other elements i should be looking at then i would certainly like to know for future reference, but for the moment i would like to know how i can change my code so i can put a list of items onto a dropdown box !! Appreciate the help if there is any !!</p>
  
  <pre><code>var lbldiv = document.createElement("div");
  var mklbl = document.createElement("label");
  mklbl.innerHTML = "Market ";
  
  var mkslct = document.createElement("select"); //dropdown
  
  lbldiv.appendChild(mklbl);
  lbldiv.appendChild(mkslct);
  
  document.body.appendChild(lbldiv);
  
  var markets = ["UK", "USA", "China"]; //list of markets
  
  
  var mkul = document.createElement("ul"); //formulated list
  mkul.className = "mkul";
  for(var i = 0; i &lt; markets.length; ++i){
      var crtli = document.createElement("li");
      crtli.value = i;
      crtli.innerHTML = markets[i];
  mkul.appendChild(crtli);
  }
  document.body.appendChild(mkul); 
  </code></pre>