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>
  • 相关阅读:
    leetcode 152. 乘积最大子序列
    leetcode 258. 各位相加 (python)
    leetcode 89. 格雷编码
    leetcode 62. 不同路径(C++)
    leetcode 142. 环形链表 II(c++)
    https证书制作及springboot配置https
    SpringBoot RestTemplate接收文件,并将文件发送到另外一个程序进行存储
    批量停止、删除docker容器
    记录Redis连接未正确释放,TCP连接过多,造成服务器上部分功能不可用和linux服务器内存一直增加问题
    外部连接mysql docker容器异常
  • 原文地址:https://www.cnblogs.com/ricky_li/p/3756987.html
Copyright © 2011-2022 走看看