How do I change the "background-color" property of a div with JavaScript?
document.all.the_div.style.background-color="black"
That doesn't work because it thinks you're subtracting color from document.all.the_div.style.background.
I also tried
document.all.the_div.style.bgcolor="black"
But it says that's not an object.
Please help. Thanks, Alan.
document.all.the_div.style.background-color="black"
That doesn't work because it thinks you're subtracting color from document.all.the_div.style.background.
I also tried
document.all.the_div.style.bgcolor="black"
But it says that's not an object.
Please help. Thanks, Alan.