网页转向代码/asp/html/java/...
1.两个域名同一个空间自动跳转的ASP代码
<%if Request.ServerVariables("SERVER_NAME")="cdpy.com" then
response.redirect "default.asp"
else%>
<%end if%>
<%if Request.ServerVariables("SERVER_NAME")="www.cdpy.com" then
response.redirect "default.asp"
else%>
<%end if%>
<%if Request.ServerVariables("SERVER_NAME")="xingqiba.com" then
response.redirect "cdhome/default.asp"
else%>
<%end if%>
<%if Request.ServerVariables("SERVER_NAME")="www.xingqiba.com" then
response.redirect "cdhome/default.asp"
else%>
<%end if%>
<%if Request.ServerVariables("SERVER_NAME")="blog.xingqiba.com" then
response.redirect "blog/"
else%>
2.html中跳转最全代码 正在进入,请稍等... 如果您的浏览器不支持跳转,请点这里.
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()",100);}
else
{window.location = "http://blog.gangege.com/";}
}
3.html的meta方式
这种方法的好处是可以控制重定向的时间
4.在
5.当前页面定时20秒自动转向对应的页面
window.setTimeout("autoLogin()",20000);
function autoLogin(){
window.location.href="http://www.hbedu.net/default.asp";
}