用JS获取DropDownList选中得值

HTML:

 <asp:DropDownList ID="DropdownList1" runat="server" AutoPostBack="true" />

JS:

 <script type="text/JavaScript">
function getvalue(){ var select1 = document.all.<%= DropdownList1.ClientID %>;
var selectvalue = select1.options[select1.selectedIndex].value;
var selectText= select1.options[select1.selectedIndex].text;
alert(selectvalue+" "+selectText);
}
</script>
上一篇:JS获取Dropdownlist选中值


下一篇:【2017-06-16】Jquery获取dropdownlist选中的内容