2

It's a very simple line of code:

document.getElementsByClassName("header-2014 clearfix")[0].backgroundColor = "#FF0000"

I'm trying to use it here:

http://www.roblox.com/Chess-place?id=95041893

I'm using the JavaScript console (could that have anything to do with it?)

I'm expecting a very simple answer, so help would be appreciated, it's probably just some simple syntax error that a newbie to JavaScript (like me) would have.

1 Answer 1

1

You obviously want to change the style of the element, so don't forget to mention it in the code:

... [0].style.backgroundColor = "#FF0000";
Sign up to request clarification or add additional context in comments.

2 Comments

Ooh Thanks, I'll be back to upvote/mark best answer later if it works.
Thanks for saving me the time ;D it won't let me say @VisioN

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.