这么获取多个dropDownList的值啊?<asp:DropDownList ID="DropDownList4" runat="server">
                                        </asp:DropDownList>
还有其它很多个,这么用js获取?? 

解决方案 »

  1.   

    既然用了asp:...的为什么要用js获取????
      

  2.   

        <asp:DropDownList ID="DropDownList1" runat="server" onchange="test()">
         ..........
        </asp:DropDownList>
    js:
        <script type="text/javascript">
            function test() {
                var dd = document.getElementById("DropDownList1");
                var sIndex = dd.selectedIndex;//索引值
                var sValue = dd.options[dd.selectedIndex].value; //索引值对应的value
                alert(sIndex + "/" + sValue);
            }
        </script>
      

  3.   

    var dd = document.getElementById("DropDownList1").value;
      

  4.   

    你竟然都 Ruant=Server 为什么还用JS获取啊
      

  5.   


    比如AJAX调用,已经URL 传参