I have a canvas Element in my simple HTML page and it has few rectangles drawn using context.fillRect() method. I need to interact with these drawn rectangles.
context.fillRect()
I've written a few tutorials on getting making and moving selectable shapes on Canvas that should give you a good understand of what you need.
The short answer is that you simply have to keep track of all of the things you want to select.