document.getElementById("ddlLineStyle").value

解决方案 »

  1.   

    dropdownlist其实就是select
    document.getElementById("selectId").options[document.getElementById("selectId").selectedIndex].value;
      

  2.   

    <body>
        <form id="form1" runat=server>
        <div>
            <asp:DropDownList ID="DropDownList1" runat=server >
                <asp:ListItem Value="a">a</asp:ListItem>
                <asp:ListItem Value="b">b</asp:ListItem>
                <asp:ListItem Value="c"></asp:ListItem>
            </asp:DropDownList></div>
            <input type=button value=test onclick="alert(document.getElementById('DropDownList1').value)" />
        </form>
    </body>