纯 html 以及 js 多域名跳转
<!--将以下的 endv.cn 改成要跳转的域名-->
第一种:单域名的跳转
1:域名在服务器端跳转
Response.Redirect(http://endv.cn)
Response.End
2、如果你的域名要在客户端跳转,可以这样:
<script language="javascript" type="text/javascript">
window.location="http://endv.cn";;
</script>
3:如果你要让域名页面显示几秒钟之后跳转,可以在html代码的<head></head>部分加上这样的域名跳转代码:
<meta http-equiv="refresh" content="3; url=http://endv.cn">
以上三种是也比较常见,比较常用的免费域名跳转代码运行平台Win9x WinNT Win2000 WinME WinXP。
4:不隐藏域名跳转之后的地址
<html>
<body>
<meta http-equiv="refresh" content="0.1;url=endv.cn">
</body>
</html>
5:可隐藏域名跳转之后的地址:
<html>
<frameset framespacing="0" border="0" rows="0" frameborder="0">
<frame name="main" src="endv.cn" scrolling="auto" noresize>
</frameset>
</html>
6:定时的域名跳转代码
<meta http-equiv="refresh" content="3;rul=http://endv.cn">
此代码可以让网页在一定的时间内,跳转到另外一个网页上,其中content=" 为跳转前停暂的秒数,rul= 为跳转的域名
<meta http-equiv="refresh" content="3;rul=http://endv.cn">
此代码可以让网页在一定的时间内,跳转到另外一个网页上,其中content=" 为跳转前停暂的秒数,rul= 为跳转的域名。
第二种:多域名的跳转
<script>try {if( self.location == "http://cnblogs.com/endv" ) {
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 {
/* ajerp.com */
if( self.location == "http://ajerp.com" ) {
top.location.href = "/all/"; // 这里跳转到目录
}
else if( self.location == "http://endv.club/" ) {
top.location.href = "/all/";
}
else if( self.location == "http://endv.cn/" ) {
top.location.href = "https://code.endv.cn/";
}
/* ajerp.com */
else if( self.location == "http://endv.top/" ) {
top.location.href = "/all/";
}
else if( self.location == "http://globaladmin.cn/" ) {
top.location.href = "/all/";
}
else if( self.location == "http://liulaisheng.cn/" ) {
top.location.href = "/all/";
}
else if( self.location == "http://suqianbao.cn/" ) {
top.location.href = "/all/";
}
else if( self.location == "https://tianyun.pub/" ) {
top.location.href = "/all/";
}
else if( self.location == "https://tianyun.space/" ) {
top.location.href = "/endv.cn/";
}
else if( self.location == "https://ajerp.com" ) {
top.location.href = "https://www.endv.cn/all/";
}
else if( self.location == "https://endv.club/" ) {
top.location.href = "https://www.endv.cn/all/";
}
else if( self.location == "https://endv.cn/" ) {
top.location.href = "https://www.endv.cn/all/";
}
else if( self.location == "https://endv.top/" ) {
top.location.href = "./all/";
}
else if( self.location == "https://globaladmin.cn/" ) {
top.location.href = "/all/";
}
else if( self.location == "https://liulaisheng.cn/" ) {
top.location.href = "/all/";
}
else if( self.location == "https://suqianbao.cn/" ) {
top.location.href = "/all/";
}
else if( self.location == "https://tianyun.pub/" ) {
top.location.href = "/all/";
}
else if( self.location == "https://tianyun.space/" ) {
top.location.href = "/endv.cn/";
}
else {
var str = server.htmlEncode("<p><ahref='https://www.endv.cn'>天云信息</a></p>");
document.write(str);
//document.write ("错误的访问地址")
}
} catch(e) {}</script>
</HEAD>
</HTML>
纯 html 以及 js 多域名跳转的更多相关文章
- js 多域名跳转
<script>try {if( self.location == "http://cnblogs.com/endv" ) { top.location.href = ...
- js实现域名判断后跳转到指定网址
js实现域名判断后跳转到指定网址,也适用于同一虚拟空间放多个网站: <script> try { if(self.locatio ...
- centos LAMP第二部分apache配置 下载discuz!配置第一个虚拟主机 安装Discuz! 用户认证 配置域名跳转 配置apache的访问日志 配置静态文件缓存 配置防盗链 访问控制 apache rewrite 配置开机启动apache tcpdump 第二十节课
centos LAMP第二部分apache配置 下载discuz!配置第一个虚拟主机 安装Discuz! 用户认证 配置域名跳转 配置apache的访问日志 配置静态文件缓存 配置防盗链 ...
- js实现QQ跳转到支付宝APP并领取红包!附:动图demo
前天我在sg开源了js实现微信跳转到支付宝并领红包的代码.https://segmentfault.com/a/11...于是朋友圈开始刷屏,各种套路,各种标题,再附上短链接,引起了很多人的好奇,然后 ...
- Apache Rewrite实现URL的跳转和域名跳转
Apache Rewrite实现URL的跳转和域名跳转 Rewirte主要的功能就是实现URL的跳转,它的正则表达式是基于Perl语言.可基 于服务器级的(httpd.conf)和目录级的 (.h ...
- JS阻止链接跳转代码
刷新后focus在第一个标签 onload="$('#input_email').focus(); " $(document).ready(function(){ $(" ...
- [HTML]js实现页面跳转,页面A跳到另一个页面B.以及页面传值(中文)
要实现从一个页面A跳到另一个页面B,js实现就在A的js代码加跳转代码 JS跳转大概有以下几种方式: 第一种:(跳转到b.html)<script language="javascri ...
- js获取域名的方法
本文实例讲述了js获取域名的方法.分享给大家供大家参考.具体实现方法如下: 复制代码代码如下: <script>//获取域名var k_host = window.location.hos ...
- asp 域名跳转
域名跳转 将xxx.cn定向到www.xxx.com dim querys,Urls Urls = "http://www.xxx.com"&Request.ServerV ...
随机推荐
- poj 1436 线段树
题意:给你N条线段(垂直于x轴)的两个y坐标还有x坐标,问相互看到的三元组有多少个.有点纠结就是,如果两个连线之间正好有一条线段的某个端点,这个也是不能计算的,所以这个端点就有意义了,所以就用上面那个 ...
- URAL 1880 Psych Up's Eigenvalues
1880. Psych Up's Eigenvalues Time limit: 0.5 secondMemory limit: 64 MB At one of the contests at the ...
- Jmeter学习之— 参数化、关联、断言、数据库的操作
一. Jmeter参数化1. 文件参数化解释:创建测试数据,将数据写入TXT文件文件中,然后Jmeter从文件中读取数据.例如用户注册操作:1. 首先在Jmeter下创建一个线程组,如下图: 2. 然 ...
- java编译优化
#java编译器对`String常量表达式`的优化: - 1.String+String 可以被编译器识别为常量表达 String a="ab" ; String b=" ...
- PowerDesigner关系线显示名称
选中关联关系线,右击选择“格式”,打开如下窗口,将“Name” 选项进行勾选上即可. 参考: http://loginleft.iteye.com/blog/2400980
- systemtap 2.8 安装说明书
systemtap: a linux trace/probe tool Visit the project web site at <http://sourceware.org/systemta ...
- AES加密时抛出java.security.InvalidKeyException: Illegal key size or default parametersIllegal key size or default parameters
使用AES加密时,当密钥大于128时,代码会抛出java.security.InvalidKeyException: Illegal key size or default parameters Il ...
- How to Make Portable Class Libraries Work for You
A Portable Class Library is a .NET library that can be used (in binary form, without recompiling) on ...
- 【转】教你用C#读写、删除、更新excel表格记录
文章出处:http://blog.csdn.net/kuangshazi515/article/details/6585118 如下图所示,编一个程序,鼠标单击窗体视图区(右边)时,获取一对坐标(X, ...
- SimpleDateFormat in Java is not Thread-Safe Use Carefully
SimpleDateFormat in Java very common and used to format Date to String and parse String into Date i ...