gpt4 book ai didi

javascript - 我想在 iframe 关闭后重新加载页面 bt 它在加载时重新加载?

转载 作者:搜寻专家 更新时间:2023-10-31 21:08:28 24 4
gpt4 key购买 nike

我想在 iframe 关闭后重新加载页面..该怎么做??我听不懂?请问有人可以帮我写这段代码吗?

 <div class="form-group border-none">
<div class="col-md-12 ">
<iframe src="<?php echo $this->base_url; ?>Profile_pic/index/<?php echo $id; ?>" width="100%" style="border:none; height:52px;">
</iframe>
</div>
</div>

<script language="javascript" type="text/javascript">
window.onload = function ()
{
if (! localStorage.justOnce)
{
localStorage.setItem("justOnce", "true");
window.location.reload();
}
}

</script>

最佳答案

如果您使用 iframe 重新加载并且 iframe 是弹出窗口,请使用:

parent.window.location.reload();

iframe 在 parent.window 中

如果 iframe 不弹出使用:

parent.document.location.reload();

关于javascript - 我想在 iframe 关闭后重新加载页面 bt 它在加载时重新加载?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27704446/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com