——致力做企业用得上的平台; ——开发企业节省成本的系统;
HTML代码教程,网站页面效果代码html调整,以下龙腾飞网络科技-小吴在建站实操中笔记记录,建站教程保存使用非常方便:
【HTML跳转】
html以及 js设置多域名跳转功能
第一种:单域名的跳转
1:域名在服务器端跳转
Response.Redirect(http://www.gzlongtengfei.com)
Response.End
2、如果你的域名要在客户端跳转,可以这样:
<script language="javascript" type="text/javascript">
window.location="http://gzlongtengfei.com";;
</script>
3:如果你要让域名页面显示几秒钟之后跳转,可以在html代码的<head></head>部分加上这样的域名跳转代码:
<meta http-equiv="refresh" content="3; url=http://gzlongtengfei.com">
以上三种是也比较常见,比较常用的免费域名跳转代码运行平台Win9x WinNT Win2000 WinME WinXP。
4:不隐藏域名跳转之后的地址
<html>
<body>
<meta http-equiv="refresh" content="0.1;url=gzlongtengfei.com">
</body>
</html>
5:可隐藏域名跳转之后的地址:
<html>
<frameset framespacing="0" border="0" rows="0" frameborder="0">
<frame name="main" src="gzlongtengfei.com" scrolling="auto" noresize>
</frameset>
</html>
6:定时的域名跳转代码
<meta http-equiv="refresh" content="3;rul=http://gzlongtengfei.com">
此代码可以让网页在一定的时间内,跳转到另外一个网页上,其中content=" 为跳转前停暂的秒数,rul= 为跳转的域名
<meta http-equiv="refresh" content="3;rul=http://gzlongtengfei.com">
此代码可以让网页在一定的时间内,跳转到另外一个网页上,其中content=" 为跳转前停暂的秒数,rul= 为跳转的域名。
第二种:多域名的跳转
<script>try {if( self.location == "http://gzlongtengfei.com" ) {
top.location.href = "http://域名一/目录";
}
else if( self.location == "http://域名二/" ) {
top.location.href = "http://域名二/目录";
}
else if( self.location == "http://域名三/" ) {
top.location.href = "http://域名三/目录";
}
else if( self.location == "http://域名四/" ) {
top.location.href = "http://域名四/目录";
}
else {document.write ("错误的访问地址")}} catch(e) {}</script>
多域名跳转完整示例:
<!DOCTYPE HTML>
<!-- -头部页面描述:START -->
<!DOCTYPE html PUBLIC "" "">
<HTML lang="en">
<HEAD>
<META charset="UTF-8">
<TITLE>龙腾飞网络科技</TITLE>
<script>try {
/* gzlongtengfei.com */
if( self.location == "http://gzlongtengfei.com" ) {
top.location.href = "/all/"; // 这里跳转到目录
}
else if( self.location == "http://college-ing.com/" ) {
top.location.href = "/all/";
}
else if( self.location == "http://365younger.com/" ) {
top.location.href = "https://gzlongtengfei.com/";
}
/* gzlongtengfei.com */
else if( self.location == "http://gaoqiwenda.com/" ) {
top.location.href = "/all/";
}
else if( self.location == "http://www.2025nian.com/" ) {
top.location.href = "/all/";
}
else if( self.location == "http://www.eduzhinan.com/" ) {
top.location.href = "/all/";
}
else {
var str = server.htmlEncode("<p><ahref='https://www.gzlongtengfei.com'>龙腾飞网络科技</a></p>");
document.write(str);
//document.write ("错误的访问地址")
}
} catch(e) {}</script>
</HEAD>
</HTML>