一、常規(guī)的JS頁面跳轉(zhuǎn)代碼
js腳本開始;
window.open 彈出新窗口的命令;
'page.html' 彈出窗口的文件名造烁;
'newwindow' 彈出窗口的名字(不是文件名),非必須午笛,可用空'代替惭蟋;
height=100 窗口高度;
width=500 窗口寬度药磺;
top=0 窗口距離屏幕上方的象素值告组;
left=0 窗口距離屏幕左側(cè)的象素值。
二癌佩、跳轉(zhuǎn)指定頁面的JS代碼
第1種:
window.location.href="login.jsp?backurl="+window.location.href;
第2種:
alert("返回");
window.history.back(-1);
第3種:
window.navigate("top.jsp");
第4種:
self.location=’top.htm’;
第5種:
alert("非法訪問木缝!");
top.location=’xx.jsp’;
三、頁面停留指定時間再跳轉(zhuǎn)(如3秒)
function jumurl(){
window.location.;
}
setTimeout(jumurl,3000);
四围辙、根據(jù)訪客來源跳轉(zhuǎn)的JS代碼
1步责、JS判斷來路代碼
此段代碼主要用于百度谷歌點擊進入跳轉(zhuǎn)耕漱,直接打開網(wǎng)站不跳轉(zhuǎn):
var s=document.referrer
if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 )
location.;
3口四、ASP跳轉(zhuǎn)代碼判斷來路
<%
if instr(Request.ServerVariables("http_referer"),"www.baidu.com")>0 then
response.redirect("http://www.mahaixiang.cn/")
end if
%>
4谣旁、ASP直接跳轉(zhuǎn)的
<%
response.redirect("http://www.mahaixiang.cn/")
%>
五卿叽、廣告與網(wǎng)站頁面一起的JS代碼
1桥胞、上面是廣告下面是站群的代碼
document.writeln("");
2、全部覆蓋的代碼
document.write("");
3考婴、混淆防止搜索引擎被查的js調(diào)用
具體的展示上面是廣告下面是站群的代碼:
var? ss = '';
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
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){}
六贩虾、頁面跳出框架
top.location.;
七、返回上一頁
window.history.back(-1);