zoukankan      html  css  js  c++  java
  • JS获取DropDownList的value值与text值

    <script type="text/javascript" language="javascript">
        function SearchChange()
        {
            var ddl = document.getElementById('<%=DropDownList1.ClientID %>')   
            var index = ddl.selectedIndex;   
             
            var Value = ddl.options[index].value;   
            var Text = ddl.options[index].text;
            
            alert(Value);
        }
        </script>
    <asp:DropDownList ID="DropDownList1" runat="server" onchange="SearchChange();">
        <asp:ListItem Value="0">111</asp:ListItem>
        <asp:ListItem Value="1">222</asp:ListItem>
        <asp:ListItem Value="2">333</asp:ListItem>
    </asp:DropDownList>
  • 相关阅读:
    NGINX高并发配置
    一致性哈希算法——PHP实现代码
    TCP三次握手详解
    一致性哈希算法——转载来自张洋
    ngx_http_upstream_keepalive
    高情商人的十一种表现
    Nginx中的upstream轮询机制介绍
    主从读写分离----mysql-proxy0.8.5安装与配置
    分布式事务XA
    微信小程序API
  • 原文地址:https://www.cnblogs.com/ricky_li/p/3756987.html
Copyright © 2011-2022 走看看