不对,是这样tdAttachedFile.rows[i].all[fieldName].value

解决方案 »

  1.   

    先修改name,再insert,把id也设上
    function addFiles(){var newRow = attachedFileSample.rows[0].cloneNode(true);
    var cName="attachedFiles";//修改名称为attachedFiles0,1,2...
    newRow.all[cName].name=cName+String(tdAttachedFile.rows.length); 
    newRow.all[cName].id=cName+String(tdAttachedFile.rows.length); 
    tdAttachedFile.insertBefore(newRow);}