【发布时间】:2017-06-07 09:03:44
【问题描述】:
在操作完成之前,我必须使用 iframe 来阻止页面重新加载。但是,我需要在操作发生后刷新它。我为此尝试了两种方法,刷新页面并重定向到同一页面。
PHP:
if(isset($_POST['btn_name']) {
//Action
location.reload();
//I also tried
header("Location: index.php");
}
HTML:
<iframe width="0" height="0" border="0px solid white" style="display:none" name="iframe1" id="iframe1"></iframe>
<form action="index.php" method="post" target="iframe1">
<input type="submit" href="" style="margin-top:5px" name="btn_name" class="btn btn-success" value="Enter">
</form>
感谢您的帮助。感谢所有输入。
【问题讨论】: