there is a JS countdown problem. The A page clicks the button to jump to the B page. After loading the B page, I immediately executed the JS countdown code for 1 minute. After execution, I clicked on the browser to return to the previous page to the A page, and then clicked again on the browser to return to the next page B page. At this time, the code for executing the JS countdown began to be executed again.
the requirement is that the JS countdown code is executed only once, and how to prevent the js code from being executed after clicking the up and down return function.
I just thought of several solutions, none of which are ideal.
I would like to ask which friend to provide ideas for solving the next problem.