119
rated 0 times
[
121]
[
2]
/ answers: 1 / hits: 188492
/ 11 Years ago, mon, july 29, 2013, 12:00:00
I want to change the color of a title when a button is clicked.
This is my code, but it's not working and I can't figure out why not...
var about;
function init() {
about = document.getElementById(about).innerHTML;
about.style.color = 'blue';
}
<div id=about>About Snakelane</div>
<input type=image src=http://www.blakechris.com/snakelane/assets/about.png onclick=init() id=btn>
More From » button