title: ASP.NET Dropdown list into jquery variable
body: <p>I have 2 code,</p>
  
  <p>This is the First:</p>
  
  <pre><code>    $("#Button1")
      .click(function () {
          var index;            
          var select = $("#DropDownList1");
          var select = document.getElementById("DropDownList1");
          var myindex = ["zero", "one", "two", "three"];
          for (index = 0; index &lt; myindex.length; index++) {
              select.appendChild(new Option(myindex[index]));
          }
      });
  </code></pre>
  
  <p>This is the Second:</p>
  
  <pre><code>    $("#Button1")
      .click(function () {
          var index;            
          var select = document.getElementById("DropDownList1");
          var myindex = ["zero", "one", "two", "three"];
          for (index = 0; index &lt; myindex.length; index++) {
              select.appendChild(new Option(myindex[index]));
          }
      });
  </code></pre>
  
  <p>Why the first code doesn't work? </p>
  
  <pre><code>    var select = $("#DropDownList1");
  </code></pre>
  
  <p>I have to change it to</p>
  
  <pre><code>    var select = document.getElementById("DropDownList1");
  </code></pre>
  
  <p>I want to turn $("#DropDownList1") to a variable.</p>