js获取select的值

<select   id="tryselect"   name="">   
  <option   value="1">text   1</option>   
  <option   value="2">text   2</option>   
  </select>   
  <script   language="JavaScript">   
  <!--   
      var   myid   =   document.getElementById("tryselect");   
      alert(myid.options[myid.selectedIndex].value   +" "   +myid.options[myid.selectedIndex].text)   
  //-->   
  </script> 

原文地址:https://www.cnblogs.com/zqr99/p/7467328.html