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 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| function insertTable2(cols, rows, border, cellspace, cellpad, alignment, width){
var icols = 0;
var irows = 0;
if(!rows)
rows = 1;
if(!cols)
cols = 1;
if(!border)
border = 0;
if(!cellpad)
cellpad = 0;
if(!cellspace)
cellspace = 0;
if(!alignment)
alignment = "left";
if(!width)
width = "90%"
var oneRowBlock = "";
var tableBlock = "";
var titreBlock = "";
// barre de titre
titreBlock += "<tr>"
while(icols < cols){
titreBlock += "<td id=\"" + icols + "\"> </td>";
icols++;
}
titreBlock += "</tr>\n"
icols = 0;
while(icols < cols){
oneRowBlock += "<td> </td>";
icols++;
}
oneRowBlock="<tr>" + oneRowBlock + "</tr>\n";
tableBlock = "<table align=\"" + alignment + "\" width=\"" + width + "\" cellspacing=\"" + cellspace + "\" cellpadding=\"" + cellpad + "\" border=\"" + border + "\">\n" + titreBlock;
while(irows < rows){
tableBlock += oneRowBlock;
irows++;
} insertHTML(tableBlock);
} |