Nur Nachman
Software, Music and Thoughts
About Me
Nur
Drum & Bass Producer, Software Developer, Love my Cats
View my complete profile
Blog
Xorcore
Now
HTML5: How to clear canvas
I have an HTML5 canvas element and I want to 'reset' it, clear the content.
How do you clear a canvas element?
1. get the canvas from the DOM:
canvas = document.getElementById("canvas");
2. reset canvas:
canvas.width = canvas.width;
Newer Post
Older Post
Home