[thelist] table layout (help!)

dave gray dascott at wam.umd.edu
Thu Sep 28 11:31:17 CDT 2000


> you can even make it ask you how big you want the borders to be:

i got bored one day and played around with the original code that got
posted a while ago until i came up with this:

javascript:var tablenum=1;var action=prompt('desired action:','cycle');
for(var i=0;i<document.all.length;i++){if(document.all[i].tagName=='TABLE'){
if(action=='cycle'||action==tablenum){document.all[i].border='1';
alert(tablenum);document.all[i].border='0';}tablenum++;}void(0);}

it turns the table borders on one at a time for the default value of
action, and if you enter a number n, it turns on the nth table if there
are that many tables

 -dave





More information about the thelist mailing list