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

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Java JSoup error fetching URL -

webstorm - PhpStorm file cache conflict with TypeScript compiler -