相关JS:

    <script type="text/javascript" language="javascript">
    
function SearchChange()
    {
        
var ddl = document.getElementById("DropDownList1")   
        
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

相关文章:

  • 2022-12-23
  • 2022-01-09
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-09
  • 2022-01-08
  • 2021-12-31
  • 2021-09-20
  • 2021-08-24
  • 2021-05-31
相关资源
相似解决方案