别了,用innerHTML属性吧
看看微软加快DHTML的几条建议吧http://www.microsoft.com/china/MSDN/library/archives/MSDNonline/features/articles/dhtmlperf.asp

解决方案 »

  1.   

    var RegDiv = document.getElementById('RegDiv');
    RegDiv.innerHTML="<br>New User Name<INPUT type='text'>"
    试试看,可能语法有小毛病,但是思路是没有问题的
      

  2.   

    function AddRow()
    {
    i = document.all.MyTable.rows.length;oNewRow = document.all.MyTable.insertRow(i);
    j=i+3;
    oNewRow.id = j;
    //添加第一列oNewCell1 = document.all.MyTable.rows[i].insertCell(0)
    k=j;
    oNewCell1.innerHTML ="铅封号"+k+":";
    //添加第二列
    oNewCell2 = document.all.MyTable.rows[i].insertCell(1)
    oNewCell2.innerHTML = "<input type='text' id='v_SealNo"+k+"'>"+"<input type=button id='Del"+k+"' name='"+k+"'  value='删除' onclick='delete_row(this,parseInt(name))' >";//添加第三列oNewCell3 = document.all.MyTable.rows[i].insertCell(2)
    oNewCell3.innerHTML ="施封时间"+k+":";//添加第四列
    oNewCell4 = document.all.MyTable.rows[i].insertCell(3)
    oNewCell4.innerHTML = "<input type='text'  id='v_ShiftTime"+k+"'> "+"<input type='button' name='"+k+"' id ='imgButton"+k+"'  width='16' height='16' border='0' onclick='fPopUpCalendarDlg(parseInt(name))'>"}我刚好再做这个,看看我的吧