title: Dropdown list using Javascript
body: <p>How does one create a dropdown list only using JS?
  Example I have my HTML, I know for dropdown list in HTML you use select and option tags but if I were not to change any HTML elements and only use Javascript and link the html in it to create a Day-Month-Year dropdown using JS, how would that be done? </p>
  
  <p>My HTML:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;title&gt; Testing for JS Dropdown&lt;/title&gt;
    &lt;style&gt;
      div {
        width: 50%;
        margin: auto;
        height: 200px;
        border: 5px solid black;
        background-color: silver;
      }
      .field {
        padding-left: 10px;
        width: 60px;
        display: inline-block;
      }
      h2 { padding-left: 10px;}
    &lt;/style&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;script src="prototype.js"&gt;&lt;/script&gt;
    &lt;script src="JStester.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div&gt;
      &lt;h2&gt; Select Day-Month-Year &lt;/h2&gt;
      &lt;p&gt; &lt;span class="field"&gt;Day &lt;/span&gt;&lt;select id="days"&gt; &lt;/select&gt;&lt;/p&gt;
      &lt;p&gt; &lt;span class="field"&gt;Month&lt;/span&gt;&lt;select id="months"&gt; &lt;/select&gt;&lt;/p&gt;
      &lt;p&gt; &lt;span class="field"&gt;Year&lt;/span&gt;&lt;select id="years"&gt;&lt;/select&gt;&lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>