Ashura: Tabelle Erweitern

Beitrag lesen

Hallo dp.

table = getElement("id","table",null);

tr = document.createElement("tr");
td1 = document.createElement("td");
td2 = document.createElement("td");

tr.appendChild(td1);
tr.appendChild(td2);

table.appendChild(tr);

  
Dieses Geraffel (was zumindest im IE mangels eingefügtem tbody-Element nicht einmal funktioniert) kannst du dir sparen, indem du [insertRow](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-39872903) und [insertCell](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-68927016) nutzt.  
  
  
Einen schönen Donnerstag noch.  
  
Gruß, Ashura  

-- 
sh:( fo:} ch:? rl:( br: n4:~ ie:{ mo:| va:) de:> zu:} fl:( ss:) ls:[ js:|  
„It is required that HTML be a common language between all platforms. This implies no device-specific markup, or anything which requires control over fonts or colors, for example. This is in keeping with the SGML ideal.“  
[[HTML Design Constraints: Logical Markup](http://www.w3.org/History/19921103-hypertext/hypertext/WWW/MarkUp/HTMLConstraints.html)]