更新时间:2022-12-07 08:38:02
有几种方法临时存储iframe的
URL
,然后检索它会在下一页重新加载。 localStorage
window.name
- er,no。哈。开玩笑。这是一个很糟糕的破解。您可能需要阅读 HTML5本地存储回退解决方案了解更多有关这些选项的信息。
I am designing an application in ASP.NET which has a Master Page and a iframe. When I click on a link within the Master Page, the link is opened in the iframe, but if I refresh the parent page the iframe loses it's source and returns a blank frame.
How can I retain the iframe src
attribute after refreshing the page like Parallel's Plesk Panel?
There are a couple of ways to temporary store the URL
of the iframe and then retrieve it on the next page reload.
localStorage
window.name
-- er, no. Ha. Just kidding. That is a bad hack.You might want to read HTML5 Local Storage fallback solutions for more info on those options.