docs:browsers:creating_dynamic_tables

creating dynamic tables

Use insertRow and insertCell after the initial table is created.

var tbl = document.createElement('table');
 
var tr = tbl.insertRow(-1);
var td = tr.insertCell(-1);

You need to use a capital S like this:

td.setAttribute("rowSpan", "2");
td.setAttribute("colSpan", "2");
  • docs/browsers/creating_dynamic_tables.txt
  • Last modified: 2010/10/12 15:20
  • by billh