窗口B是由窗口A链接过来的
窗口B想要在header跳转到C之前,刷新一下窗口A,或者跳转之后刷新,但是不能在C页面上写代码刷新A
本来想使用echo "<script>
if (opener && typeof(window.opener.document)!='unknown' && typeof(window.opener.document)!='undefined')
{
opener.location.href=opener.location.pathname+opener.location.search;
}
</script>";
header("location:");
但是header前面的echo通常不起作用,
请问这时候应该怎么做?谢谢
窗口B想要在header跳转到C之前,刷新一下窗口A,或者跳转之后刷新,但是不能在C页面上写代码刷新A
本来想使用echo "<script>
if (opener && typeof(window.opener.document)!='unknown' && typeof(window.opener.document)!='undefined')
{
opener.location.href=opener.location.pathname+opener.location.search;
}
</script>";
header("location:");
但是header前面的echo通常不起作用,
请问这时候应该怎么做?谢谢
在B的onsubmit里写window.opener.location.href=window.opener.location.href即可