各位大虾:
  小弟有2个问题要问:
  1. 用js实现DropDownList无刷新,要求能够取得DropDownList中的数值
  2.用js在输入时验证<asp:textbox>的数值是否为数字

解决方案 »

  1.   

    2.
    控制非数字不能输入:<asp:textbox class="Text" 
       onkeypress="if (event.keyCode < 48 || event.keyCode >57) event.returnValue =  false;" id="txtY_Revenue" style="TEXT-ALIGN: right"  runat="server" Width="90%" MaxLength="12">
    </asp:textbox>
      

  2.   

    1、在页面中方个
    <INPUT id=ab type=hidden name=abrunat="server">
    在page_load的时候加入
    DropDownList..Attributes.Add("onchange","javascript:document.Form1.ab.value=this.options[this.selectedIndex].value;");然后,后台取ab 的值
      

  3.   

    修改
    DropDownList.Attributes.Add("onchange","javascript:document.Form1.ab.value=this.options[this.selectedIndex].value;");
      

  4.   

    说错了,我要取的是服务器控件<asp:textBox>的值,而且是不发生AutoPostBack