简体   繁体   English

从另一个页面返回时如何强制 HTML 重新加载

[英]How to force HTML to reload when returning from another page

The HTML links to another page that may update what should show on screen. HTML 链接到另一个页面,该页面可能会更新应在屏幕上显示的内容。 When the the page returns to my program the program is not reloaded and what is shown is no longer completely valid.当页面返回到我的程序时,程序不会重新加载,显示的内容不再完全有效。 (Yes, I know some times the opposite happens.) The only possible solution I can think of is to set the timer to trigger a reload. (是的,我知道有时会发生相反的情况。)我能想到的唯一可能的解决方案是设置计时器以触发重新加载。 However, I don't want the event to be triggered until after the HTML/JAVASCRIPT regains control (will the browser do that for me?)但是,我不希望在 HTML/JAVASCRIPT 重新获得控制权之前触发事件(浏览器会为我这样做吗?)

You could use window.parent to access page and refresh it from your second page.您可以使用 window.parent 访问页面并从第二页刷新它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM