返回上一页并强制页面刷新
强制载入后刷新一次
在要载入的页面加入以下代码:
1
<script type=
"text/javascript"
>
2
if
(window.name !=
"bencalie"
){
3
?????
location.reload();
4
?????
window.name =
"bencalie"
;
5
}
6
else
{
7
?????
window.name =
""
;
8
}
9
</script>
禁止缓存,来达到刷新效果引用内容:
1
<
meta
http-equiv
=
"Expires"
CONTENT
=
"0"
>
2
<
meta
http-equiv
=
"Cache-Control"
CONTENT
=
"no-cache"
>
3
<
meta
http-equiv
=
"Pragma"
CONTENT
=
"no-cache"
>
返回上一页代码:
1
<a href=
"Javascript:window.history.go(-1)"
>返回上一页</a>
PHP会经常使用下面的方式,服务器处理完就返回上一页:
1
$page
=
"upload.php"
;
2
echo
"<script>alert('上传成功!'); window.location = ""
.
$page
.
"";</script>"
;