zoukankan      html  css  js  c++  java
  • 在dropDownList中实现既能输入一个新值又能实现下拉选的代码

    aspx: 

    <div id="selDiv" style=" z-index:100; visibility:visible; clip:rect(0px 110px 80px 92px); position:absolute"><%--left:279px; top:167px"--%> 
    <asp:DropDownList ID="workerno_list" runat="server" style="z-index:-1" Width="110px" ></asp:DropDownList> 
    </div> 
    <asp:TextBox ID="workerno_value" runat="server" style=" z-index:103px; position:absolute" Font-Size="10" Width="93px" MaxLength ="50" Height="22px"></asp:TextBox> 
    <script> 
    function addTxtTanto(va) 

    document.getElementById("workerno_value").value=va; 
    document.getElementById("workerno_value").select(); 

    </script> 

    aspx.cs: 

    page_load() 

    if (!IsPostBack) 

    workerno_list.Attributes["onchange"] = "addTxtTanto(this.options[selectedIndex].innerText)"; 

  • 相关阅读:
    Dice 5 ==> dice 7
    Dice 7 ==> dice 5
    100 floors 2 eggs
    Determine overlapping rectangles
    Product of integers
    Maximum profit of stocks
    样式表
    20170508
    2017年05月07
    The second day of school
  • 原文地址:https://www.cnblogs.com/sjqq/p/6409433.html
Copyright © 2011-2022 走看看