title: Get select element value on event using pure JavaScript
body: <p>I want to get the value of a select element when the select element is clicked! I want to do it without an <code>onchange</code> attribute in the HTML.</p>
  
  <p>I would like to achieve this without jQuery. I don't want to include a jQuery framework into this website when this tiny script is the only thing I need.</p>
  
  <pre><code>var select_element = document.getElementById('product-form-user-enquiry-type');
  
  select_element.onchange = function(e){
      if (!e)
          var e = window.event;
      var svalue = select_element.value;
      alert( svalue );
  }
  if ( select_element.captureEvents ){
      select_element.captureEvents(Event.CHANGE);
  }
  </code></pre>
  
  <p>The <code>select_element.value;</code> contains an empty string. How should I do this?</p>