1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
newTable = document.createElement('table');
tablebody = document.createElement("tbody");
newTr = document.createElement('tr');
newTd = document.createElement('td');
newFieldset = document.createElement('fieldset');
newLegend = document.createElement('legend');
newLegend.innerHTML='legend';
newLabel = document.createElement('label');
newLabel.innerHTML='test : ';
nouveauInput = document.createElement('input');
nouveauInput.type = 'text';
nouveauInput.value = val;
newFieldset.appendChild(nouveauInput);
//newLegend.appendChild(newLabel);
newFieldset.appendChild(newLegend);
newTd.appendChild(newFieldset);
newTr.appendChild(newTd);
tablebody.appendChild(newTr);
newTable.appendChild(tablebody);
formDiv.appendChild(newTable);
newTable.setAttribute("width","100%"); |