Home >Backend Development >PHP Tutorial >php页面显示内容后延时跳转

php页面显示内容后延时跳转

WBOY
WBOYOriginal
2016-06-23 14:21:071048browse

想做一个页面,传一个url进来,先把页面本身的内容显示出来,然后几秒后跳转到url。
例如:下载页面,放些广告,然后跳转。
网站好多虽然可以跳转,可是显示不出内容,求大神


回复讨论(解决方案)

HTTP 头中有延时跳转的指令
如 header("Refresh:5;url=index.php");
将在 5 秒钟后转到 index.php

HTTP 头中有延时跳转的指令
如 header("Refresh:5;url=index.php");
将在 5 秒钟后转到 index.php
不是我要的效果,我要的是在跳转前可以把本页面内容显示出来,请写个整体的代码看看喽,谢谢

$(document).ready(function(){
  setTimeout(function(){location.href="bbb.html";},5000);
});

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