Get HTML Table ID

G

Guest

Hi,

I get a collecton of tables usig below JS.

How do I write out the table ID in my alert?



var eleTables = document.getElementsByTagName("table");

for (var i=0; i < eleTables.length; i++)

{

alert(eleTables.Id);


}
 
K

Kevin Spencer

JavaScript is case-senditive:

alert(eleTables.id);

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top