Created
November 26, 2013 01:12
-
-
Save nola/7651848 to your computer and use it in GitHub Desktop.
javascript for loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myLinkCollection = document.getElementsByTagName("a"); | |
| for (i=0;i<myLinkCollection.length;i++) { | |
| if (myLinkCollection[i].getAttribute("href")) { | |
| // do something with the anchor tags here | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment