js如何获取本页中select选中的值!

 <html>  

 <head>  

  <script type="text/javascript">  

     function okIS(val)     

  {     

    //String  n=this.options[selectedIndex].value;      

   alert(val);  

  }     

    </script>     

</head>  

<body>     

  <select   name="sel"   onchange="okIS(this.options[selectedIndex].value)">     

  <option value="1"/>a 

  <option value="2"/>b  

<option value="3"/>c  

 <option value="4"/>d 

</select>   

</body>  

</html> 

猜你喜欢

转载自summerlin.iteye.com/blog/2212101