我想在 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/