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   +"\n"   +myid.options[myid.selectedIndex].text)  
  //-->  
  </script> 

原文地址:https://www.cnblogs.com/0000/p/1603600.html