Created
December 12, 2012 05:00
-
-
Save DavidWells/4264998 to your computer and use it in GitHub Desktop.
Get and display div names on page
This file contains 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
javascript: var t = document.getElementsByTagName('div'); | |
for (i = 0; i < t.length; i++) { | |
void(t[i].style.padding = '5px;'); | |
b = t[i].id; | |
h = t[i].innerHTML; | |
void(t[i].innerHTML = '<p style=\'color:red;font-weight:bold;\'>' + b + '</p>' + h); | |
void(t[i].style.border = '2px solid red'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment