他们都是服务器按钮
我现在遇到的问题是,点第一次可以生成,在点就不生成了,有什么办法解决吗

解决方案 »

  1.   

    <input id="btnAddZheKou" onclick="AddZheKou()" class="btn05" onmouseover="this.className='btn04'"
                                                onmouseout="this.className='btn05'" type="button" value="添加" />
      

  2.   

    function AddZheKou() {
                        var temps = _$('zhekouTboby').innerHTML + html();
                        _$('zhekouTboby').innerHTML = temps;                    //            var oldLines = $("#zhekouTboby").html();
                        //            var newLine = newLineHtml();
                        //            $("#zhekouTboby").append(newLine);            
                    }
      

  3.   

    不要用服务器端按钮,用js来实现。
    你见过点下按钮页面刷新一下,然后页面中多个文本框的例子吗?没有刷新,因为是使用了js来实现的。
      

  4.   

    function html() {
                        var obj = document.getElementsByName('zhekouTbale');
                        var strs = "<table id='zhekouTbale' name='zhekouTbale' cellspacing='2'><tr><td> 从 <select style='width:46px;' id='SZheKou'>" + options("1") + "</select></td><td> 到 " +
                "<select style='width:46px;' id='EZheKou'>" + options("2") + "</select></td><td>返点:<input id='ZKDiscount' value ='0' style='width:36px;' type='text' /></td>" +
                "<td>区域内浮动点:<input id='DiscountAreaInnerAdd' style='width:36px;' value='0' type='text' /></td>"+"<td>区域外浮动点:<input id='DiscountAreaOuterAdd' style='width:36px;' value='0' type='text' /></td>"+"<td>本地浮动点:<input id='DiscountLocalAdd' style='width:36px;' value='0' type='text' /></td>" +
                "<td>留:<input id='ZKMoney' value ='0' style='width:36px;'  type='text' />元</td><td></td><td></td><td><input id='btnDelZheKou" + obj.length + "' onclick='DelZheKou(this)' type='button' value='删除' class='btn05' /></td>" +"</tr></table>";
                        return strs;
                    }这个是要生成的控件
      

  5.   

    js:
    document.createElement("textbox");
      

  6.   


                int num;
                string numstr = this.txtNum.Text.Trim();
                num = int.Parse(numstr);
                if (num < 11)
                {              
                    for (int i = 1; i < num+1; i++)
                    {
                        TextBox txtShow = new TextBox();
                        txtShow.ID = "txtIMEI" + i.ToString();
                        txtShow.CssClass = "dropDownListInputCss";
                        txtShow.Text = "IMEI" + i.ToString();
                        this.PlaceHolder1.Controls.Add(txtShow);
                    }        
                }
      

  7.   

    只要添加个PlaceHolder控件就搞定!