Closed Thread Icon

Topic awaiting preservation: loop through all page elements Pages that link to <a href="https://ozoneasylum.com/backlink?for=8846" title="Pages that link to Topic awaiting preservation: loop through all page elements" rel="nofollow" >Topic awaiting preservation: loop through all page elements\

 
Author Thread
smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 09-04-2003 12:51

Hi guys,

I have another question for you, what is the easiest and most efficient way to loop through all elements in an html page? I know you can build loops based on getElementsByTagName() etc. But how do you just loop through ALL elements?

Thanks,

Jon

rickindy
Nervous Wreck (II) Inmate

From: Indianapolis, In USA
Insane since: Jan 2002

posted posted 09-04-2003 14:57

document.getElementsByTagName("*") should do it

Few problems in life can't be solved by chocolate

smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 09-04-2003 15:41

thanks - works a treat, i'd never even thought about an asterisk wildcard, just assumed it didn't work

« BackwardsOnwards »

Show Forum Drop Down Menu