Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.lang.javascript > #79
| Newsgroups | alt.comp.lang.javascript |
|---|---|
| Date | 2022-06-29 05:49 -0700 |
| References | <w4S%f.88817$%H.37516@clgrps13> |
| Message-ID | <9ce748b5-ab63-4e5f-b6f1-edc65aadd242n@googlegroups.com> (permalink) |
| Subject | Re: Loop elements |
| From | Angel <he12091983@gmail.com> |
var all = document.getElementsByTagName("*");
for (var i=0, max=all.length; i < max; i++) {
// Do something with the element here
}
********************************************************************
Angel
News kirjutas Reede, 14. aprill 2006 kl 20:44:44 UTC+2:
> Hi
> I am trying to understand how to loop through a HTML page's elements.
> for(x=0;x<WHAT DO I PUT HERE???;x++)
> {
> //do something
> }
> would someone please tell me the correct way of doing this.
> Thanks
Back to alt.comp.lang.javascript | Previous | Next | Find similar
Re: Loop elements Angel <he12091983@gmail.com> - 2022-06-29 05:49 -0700
csiph-web