Home  >  Article  >  php教程  >  PHP弹出提示框并跳转到新页面(重定向)

PHP弹出提示框并跳转到新页面(重定向)

WBOY
WBOYOriginal
2016-06-13 09:43:54716browse

开始使用如下跳转:
echo "";

alert里面是提示的消息,href是提示后跳转的页面。

后来想起TP框架里面有个redirect()重定向的方法,就去看了看。

不过TP自带的不是弹出窗,于是修改为:

 ""; 
 "";

两个直接跳转的方式:

("Location:".PSYS_BASE_URL."user/index"("refresh:{};url={}");

最后还有一个问题,跳转代码后都跟上一个 return,因为还会执行后面的语句。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn