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>
  • 相关阅读:
    EMVTag系列15《选择应用响应数据》
    EMVTag系列14《支付环境响应数据》
    EMVTag系列13《脱机PIN》
    EMVTag系列9《卡片管理数据》
    EMVTag系列7《静态签名数据》
    EMVTag系列6《IAC 发卡行行为代码》
    EMVTag系列2《磁条等效数据》
    code1169 传纸条
    关于 变量越界
    code1039 数的划分
  • 原文地址:https://www.cnblogs.com/ricky_li/p/3756987.html
Copyright © 2011-2022 走看看