JavaScript -Zuweisung der Indexnummer in die Zeile in der Tabelle
var rows = tbl.rows; n = 1;
for (i=0; i<rows.length; i++) {
row = rows[i];
f = row.firstElementChild;
if (f) {
el = document.createElement(f.tagName);
el.innerHTML = (f.tagName == "TH") ? "#" : n;
row.insertBefore(el, f);
if (f.tagName != "TH") n++;
}
}
SAMER SAEID