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 -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -