⇜ Click to draw on this canvas
⇜ Click to draw on this canvas
The onclick handler called this function:
function draw_b() {
var b_canvas = document.getElementById("b");
var b_context = b_canvas.getContext("2d");
b_context.fillRect(50, 25, 150, 100);
}
function draw_b2() {
var b_canvas = document.getElementById("b");
var b_context = b_canvas.getContext("2d");
b_context.fillRect(150, 125, 150, 100);
}