js get context of canvas code example
Example: javascript getcontext
var canvas = document.getElementById("canv");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(10, 10, 80, 80);
var canvas = document.getElementById("canv");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(10, 10, 80, 80);