HTML Onclick Change Style of DIV?

Micro Sniff

New member
I have the basic html code below, which will change the background color of the link you are clicking to the color blue.

<a onclick="this.style.backgroundColor = 'blue';" style="background-color: red;" class="link">HELLO</a>

The code is working, but I want it so that it changes the background color of a different DIV somewhere else on the page, with a certain ID. Can someone tell me who this is done? Any help would be greatly appreciated.
 
Back
Top