1var canvas = document.getElementById("myCanvasID");
2var context = canvas.getContext('2d');
3context.clearRect(0, 0, canvas.width, canvas.height); //clear html5 canvas
1var canvas = document.getElementById('myCanvas');
2var context = canvas.getContext('2d');
3context.clearRect(0, 0, canvas.width, canvas.height);