HTML5 click event
Posted
by RichadC
on Stack Overflow
See other posts from Stack Overflow
or by RichadC
Published on 2010-06-18T06:48:57Z
Indexed on
2010/06/18
6:53 UTC
Read the original article
Hit count: 161
I made an array of squares
ctx.fillStyle = "rgb(0,0,0)";
for(x=0;x<=25;x++){
for(y=0;y<=25;y++){
ctx.fillRect(x, y, 20, 20);
}
}
and I want a square to change its colour when clicked. How can I do that? I'm don't know much HTML5 and need some help. Thanks
© Stack Overflow or respective owner