javascript - Style.length and Style.width are not working -
console.log(document.getelementbyid("mycanvas").style.length);
i have code in program. returns 0, despite length of canvas being 660. know why?
you can width , height through this.
var canvas = document.getelementbyid("mycanvas"); var width = canvas.width; var height = canvas.height;
Comments
Post a Comment