this.options[this.selectedIndex].value

解决方案 »

  1.   

    document.getElementsByName("payway_id")[0].options[document.getElementsByName("payway_id")[0].selectedIndex].value;o 好长
      

  2.   

    <select name="payway_id" onchange="change_event(this)"> 
    <option  value=1>a </option> 
    <option  value=2>b </option> 
    </select> <script>
    function change_event(sef){
        try{
            var orders_id = sef.options[sef.selectedIndex].value;
            location.href='right.php?action=changepayway&orders_id='+orders_id;
        }catch(e){}
    }
    </script>
      

  3.   

    <select name="payway_id" onchange="change_event(this.value)">  
    <option  value=1>a  </option>  
    <option  value=2>b  </option>  
    </select>  <script> 
    function change_event(iSelect){ 
        try{ 
            location.href='right.php?action=changepayway&orders_id='+iSelect; 
        }catch(e){} 

    </script>