Draw points with mouse coordinates
I'm searching for tutorials but I can not find them, I want this:
"When a user click in the canvas, draw that point."
How can I do that?
I have the mouse coordinates, but now? For example:
How can I put this coordinates into my canvas?
$('#mouse_coord').html(e.pageX +', '+ e.pageY);
<canvas id="canvas" style="border: none;" width="700" height="500"></canvas>
Then, if a user draw more points, I would like to draw a poligon with a line that link the vertices.
Can you please tell me how can I do that?