См. jsFiddle для примера. Как вы и просили, это простой JavaScript:
var table = document.getElementById("myTable");
var max = 0;
for (var i = 0, iLen = table.rows.length; i < iLen; i++) {
var temp = 0;
var cells = table.rows[i].cells;
for (var j = 0, jLen = cells.length; j < jLen; j++) {
// This is very important. If you just take length you'll get the
// the wrong answer when colspan exists
temp += cells[j].colSpan;
}
if (temp > max) {
max = temp;
}
}
alert(max);