Any one help me to create canvas object in html using javascript.
Answer (1)
use the following code to create canvas object in html using javascript
javascript is here:-
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(0,0,150,75);