![]() |
|
|
+ Search |
![]()
|
Dec 4th, 2003 06:58
Russ Locke, sushil Pan,
1st) assign an id to the table
<table id="countcolumns">
2nd) create your JS function:
function tableColumns() {
try {
return document.getElementById("countcolumns").rows[0].cells.length;
}
catch(e) { return 0; } // table has no rows - therefore no columns
}