You are here: Re: table with no IDs « HTML « IT news, forums, messages
Re: table with no IDs

Posted by Bobbo on 11/28/28 11:54

bradley_d_watkins@hotmail.com wrote:

>
> The first one alert returns the first table, but the second alert gives
> an error....
>

Try making a separate page with just two tables and some cut-down
javascript, then you'll be able to see more clearly what's going on.

e.g. The following code shows you the Id (if any) and how many rows are
in each of the tables on your page. Alter the alert statement and see
what happens.

var tabs = document.getElementsByTagName("table");
var i = 0;
for(i = 0; i < tabs.length; i++)
{
alert(tabs[i].id);
alert(tabs[i].getElementsByTagName("tr").length);
}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация