且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

页面刷新后如何保留javascript变量值?

更新时间:2023-10-07 09:29:40

我可以看到两种方法@

-卸载原始页面后关闭弹出窗口,并在页面加载后再次将其重新打开.
-在弹出窗口中,您可以设置一个计时器,并在刷新完成后在原始窗口中调用脚本.
I can see two ways@

- close the popup when the original page is unloaded, and re-open it again after the page has loaded.
- in the popup you could set a timer and call a script in the original window after it finishes its refresh.