title: How to populate a drop down list in HTML5 using javascript?
body: <p>I want to fetch data from web service, and populate that into a drop down list.
  My code is as given below. A drop down is created but data cannot be populated. Please suggest me with some code.</p>
  
  <pre><code>function jsondata(data)
      {
          alert("JSONdata");
          var parsedata=JSON.parse(JSON.stringify(data));
          var captain_details=parsedata["Captain Details"];
  
          var drop_down=document.getElementById("captainlist");
          var drop=document.createElement("select");
  
          for(var i=0;i&lt;captain_details.length;i++)
          {
               var captain = captain_details[i];
               captain_name=captain['Captain Name'];
  
               alert(captain_name);   
  
               document.getElementById("captainlist").appendChild(drop);
               drop.add(captain_name,null);
          }
      }
  </code></pre>