title: How to get the selected text instead of value in dropdown menu
body: <p>I am trying to get the user selected texts for my dropdown menu.</p>
  
  <p>I have</p>
  
  <pre><code>   var selectMenu=document.createElement('select');
              selectMenu.className='menu';
  
          for(var i=0; i&lt;array.length; i++){
  
             var option=document.createElement('option');
                 option.className='option';
                 option.innerHTML=array[i].name;
                 option.value=array[i].id;
  
              selectMenu.appendChild(option);
           }
  
           $(selectMenu).change(function(){
  
             //i want to get the selected text here
  
             //I know I could get value by using $(this).val()
             //but not sure how to get the selected text here.
  
           })
  </code></pre>
  
  <p>I have google the issue and all I found are like</p>
  
  <pre><code>$('#menu option:selected).text().
  </code></pre>
  
  <p>Are there anyways to get what I need? Thanks a lot!</p>