Created
June 8, 2021 03:12
-
-
Save Tanu-N-Prabhu/da79622484e6ea9eee366d48bb363b53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reset(){ | |
// Clearing the input field | |
var inputs = document.getElementsByTagName("input"); | |
for(var i=0;i<inputs.length;i++) | |
inputs[i].value = ''; | |
// Clearing the Canvas | |
var canvas = document.getElementById('myCanvas'); | |
var ctx = canvas.getContext('2d'); | |
ctx.clearRect(0, 0, canvas.width, canvas.height); | |
window.location.reload(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment