+ 1

how do you clear the page in js

so let say someone guessed wrong on a game and the screen has to clear its self how do I do that?

8th Apr 2020, 1:35 PM
ANONYMOUS
ANONYMOUS - avatar
1 Respuesta
0
document.open(); document.close(); This will reset (clear) the whole document (and restart with empty one)... Any event listener should be forgotten, but js global scope (window object) doesn't forget for almost other js context.
9th Apr 2020, 5:29 AM
visph
visph - avatar