各位大个,,小弟正在学这个php跳转代码,,,在所有的浏览器测试都可以跳转,,但在firefox浏览器就不会自动跳转,,因为是用到JS实现的.
各位大个,,小弟正在学这个php跳转代码,,,在所有的浏览器测试都可以跳转,,但在f、本文来源gao($daima.com搞@代@#码$网搞gaodaima代码irefox浏览器就不会自动跳转,,因为是用到JS实现的.
Get_admin_msg(“list.php”,”登录成功!”);
function Get_admin_msg($url,$show)
{
$msg=’
<meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″ />
<script type=”text/javascript”>
t = -1; // 计数器
setInterval(“testTime()”,1000); // 启动1秒定时
function testTime() {
if(t<0) return; // 计数器值小于0,表示尚未开始倒计时
if(t == 0) // 计数器值为0,转向
location = “‘.$url.'”;
view.innerHTML =t; // 显示倒计时
t–; // 计数器递减
}
</script>
<style type=”text/css”>
body{ font-size:12px;}
#man_zone{ width:500px; margin:0px auto;}
.table td{ text-align:center;}
.table p{ padding:0px; margin:0px; height:5px;}
.zt{color:#f30; font-weight:bold;}
a{color:#f30;text-decoration:none;}
</style>
<body onl oad=”t=5″>
信息提示 |
‘.$show.’ 5 秒钟返回指定的页面! 如果浏览器无法跳转,请点击此处! |
‘;
echo $msg;
exit();
}
——解决方案——————–
view.innerHTML =t; // 显示倒计时 =>
document.getElementById(“view”).innerHTML =t; // 显示倒计时
建议装个 firebug