22
Using jQuery:
First, we determine which cell was clicked, then you could just draw over that rectangle with a different colour:
$("#canvas").click(function(e){
var x = Math.floor((e.pageX-$("#canvas").offset().left) / 20);
var y = Math.floor((e.pageY-$("#canvas").offset().top) / 20);
ctx.fillStyle = "rgb(255,255,255)";
ctx.fillRect(x*20, y*20, 20, 20);
});