请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

孔孟之乡

 找回密码
 注册

QQ登录

只需一步,快速开始

快捷导航
搜索
查看: 2266|回复: 2

页面跳转代码集锦

[复制链接]
发表于 2009-8-29 23:37:29 | 显示全部楼层 |阅读模式

1 <meta http-equiv="refresh" c>

2

<script language="JavaScript">
<!--
        var userAgent = navigator.userAgent;
        var MSIEIndex = userAgent.indexOf("MSIE");
        if (userAgent.indexOf("Win")  != -1 &amp;&amp;
                userAgent.indexOf("MSIE") != -1 &amp;&amp;
                userAgent.substring((MSIEIndex + 5),(MSIEIndex + 8)) >= 5.5)
                window.location.replace("http://www.shuigong.com");
//-->
</script>

没时间转移

3

有些人想访问网站时,直接进入某个子目录中的文件,如cgi-bin/leoboard.cgi,这时,你只要写一个默认的首页文件如index.htm,内容如下,就可以实现你的要求.
方法一:

<html>
<head>
<title>网页跳转</title>
<meta http-equiv="refresh" c>
</head>
<body>
</body>
</html>

 

方法二
<html>
<head>
<title>正在进入>>> Loading>>> </title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p> </p><tr> <td width=724>
<p align=center><font color="red" size="2">正在进入,请等待,谢谢......</font></p></td></tr><tr>
<td width="724">
<p align=center>
<form name=loading>
<div align=center>
<p>
<input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:rgb(124,119,119); background-color:white; padding:0px; border-style:none;">
<br> <input type=text name=percent size=46 style="color:rgb(138,134,134); text-align:center; border-width:medium; border-style:none;"><script>var bar = 0
var line = "||"
var amount ="||"
count()
function count(){
bar= bar+2
amount =amount  +  line
document.loading.chart.value=amount
document.loading.percent.value=bar+"%"
if (bar<99)
{setTimeout("count()",10);}
else
{window.location = "http://www.wwwfox.net/cgi-bin/leoboard.cgi";}
}</script>

</body>
</html>

 

PHP的跳转代码_多域名指向同一空间

 

<?php
$domain_net="guan8.net";
$domain_com="362700.com";
$dot_net_url="bbs/";
$dot_com_url="index.html";
if(($HTTP_HOST=="$domain_net")or($HTTP_HOST=="www.$domain_net"))
{
Header("Location: $dot_net_url");
}
elseif(($HTTP_HOST=="$domain_com")or($HTTP_HOST=="www.$domain_com"))
{
Header("Location: $dot_com_url");
}
else
{
include_once('hehe.php');
}
?>

回复

使用道具 举报

发表于 2012-4-28 19:53:43 | 显示全部楼层
顶起来,受教了,支持支持























防辐射服哪个牌子好
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|孔孟之乡-春秋论坛 ( 鲁ICP备06020822号-1  

GMT+8, 2025-2-14 21:52 , Processed in 0.267219 second(s), 18 queries .

Powered by 孔孟之乡-春秋论坛

© 2006-2014 SKIN BY KMZX

返回顶部