JavaScript Problem
By
robeng
in Programming
in Programming
Go to solution
Solved by Mooshe,
document.getElementsByTagName() does not return an HTMLElement, but rather an array of elements. You would need to iterate through the list to modify the style of each element:
for(h in document.getElementsByTagName("header")) {
h.style.top = ...;
}
if you just want to edit one specific element, I would recommend providing an ID attribute to that element to select it.
-
Featured Topics
-
Topics
-
LucasTSP ·
Posted in General Discussion0 -
madsci1016 ·
Posted in General Discussion0 -
Jimmie22 ·
Posted in Troubleshooting7 -
SnowYetti ·
Posted in Cases and Mods1 -
3
-
2
-
6
-
svvkjbe ·
Posted in Graphics Cards7 -
TheDarkLoS ·
Posted in New Builds and Planning5 -
bensinspade ·
Posted in Graphics Cards5
-
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now