当前位置: 代码迷 >> Java Web开发 >> 急怎么从动态增加的文本框中取值?或者说怎么从数据库从取值赋到动态增加的文本框中?求教
  详细解决方案

急怎么从动态增加的文本框中取值?或者说怎么从数据库从取值赋到动态增加的文本框中?求教

热度:585   发布时间:2016-04-17 12:58:46.0
急.如何从动态增加的文本框中取值??或者说如何从数据库从取值赋到动态增加的文本框中?求教
用JS动态增加的文本框代码如下:
function   addLinkman(datas)
    {
            var   link   =   linkman;
            var   tr   =   link.insertRow(newcount+count+2);
            td0   =   tr.insertCell();
            td1   =   tr.insertCell();
            td2   =   tr.insertCell();
            td3   =   tr.insertCell();
            td4   =   tr.insertCell();
            td5   =   tr.insertCell();

            td0.innerHTML= " <input   type=\ "text\ "   class=\ "wbk\ "   require=\ "true\ "   dataType=\ "LimitB\ "   min=\ "1\ "   max=\ "50\ "   msg=\ "姓名要在25个字内\ "   value=\ " "+datas[ "conname "]+ "\ "   name=\ "conname "+(newcount+count)+ "\ "/> ";
            td1.innerHTML= " <input   type=\ "text\ "   class=\ "wbk\ "   require=\ "false\ "   dataType=\ "LimitB\ "   min=\ "1\ "   max=\ "50\ "   msg=\ "部门职位要在25个字内\ "   value=\ " "+datas[ "conjob "]+ "\ "   name=\ "conjob "+(newcount+count)+ "\ "/> ";
            td2.innerHTML= " <input   type=\ "text\ "   class=\ "wbk\ "   require=\ "false\ "   dataType=\ "Number\ "   msg=\ "电话只能输入数字\ "   value=\ " "+datas[ "conphone "]+ "\ "   name=\ "conphone "+(newcount+count)+ "\ "/> ";
            td3.innerHTML= " <input   type=\ "text\ "   class=\ "wbk\ "   require=\ "false\ "   dataType=\ "Number\ "   msg=\ "手机只能输入数字\ "   value=\ " "+datas[ "conmobile "]+ "\ "   name=\ "conmobile "+(newcount+count)+ "\ "/> ";
            td4.innerHTML= " <input   type=\ "text\ "   class=\ "wbk\ "   require=\ "false\ "   dataType=\ "Email\ "   msg=\ "EMAIL格式不正确\ "   value=\ " "+datas[ "conemail "]+ "\ "   name=\ "conemail "+(newcount+count)+ "\ "/> ";
         

          if   (datas[ "conname "]   ==   " ")
          {
                  td5.innerHTML= " <input   type=\ "button\ "   name=\ "ch\ "     class=\ "wbk\ "   onClick=\ "delLinkman();\ "   value=\ "删除\ "> ";                          
                  newcount++;
          }
          else
          {                        
  相关解决方案