我想在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>
答案 0 :(得分:2)
如果您使用iframe重新加载并弹出iframe,请使用:
parent.window.location.reload();
iframe在parent.window
中如果iframe没有弹出使用:
parent.document.location.reload();