title: Select option html in JavaScript
body: <p>I'm trying to make the JavaScript for a <code>&lt;select&gt;</code>'s <code>&lt;option&gt;</code> with 2 items inside it, but I don't seem to be able to do any events once one of them are selected. Here's my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var e1 = document.getElementById("#selector").option[0].text;
  var e2 = document.getElementById("#selector").option[1].text;
  var e3 = document.getElementById("#selector").option[2].text;
  document.querySelector("e1").addEventListener("click", myInfo, false);
  
  function myInfo(){
    alert("Test");
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;select id="selector"&gt;
    &lt;option value="" disabled="disabled" selected="selected"&gt;Select a layout&lt;/option&gt;
    &lt;option value="1"&gt;One&lt;/option&gt;
    &lt;option value="2"&gt;Two&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>