close
對於轉網址解釋慣用性的
能對網址多做為利用
看你的方法來制做更多偵測
看你的方法來制做更多偵測
方法一:頁面到達與不到達轉向地趾
<script>
if ( location.hostname == "/" ) {
window.location = "file:///C:/";
<script>
if ( location.hostname == "/" ) {
window.location = "file:///C:/";
} else if ( location.hostname == "file:///E:/" ) {
window.location = "file:///D:/";
} else {
window.location = "49.idv.tw";
}
</script>
window.location = "file:///D:/";
} else {
window.location = "49.idv.tw";
}
</script>
方法三: 直接轉向
<meta http-equiv="Refresh" content="0; url=home.html">
<meta http-equiv="Refresh" content="0; url=home.html">
方法四: 不是直接開啟的就轉向
<script>
if (window!=top){top.location.href=location.href;}
</script>
<script>
if (window!=top){top.location.href=location.href;}
</script>
方法五: frames分割轉向
<SCRIPT>
if (top.frames.length > 0)
{
top.location=self.location;
}
</SCRIPT>
<SCRIPT>
if (top.frames.length > 0)
{
top.location=self.location;
}
</SCRIPT>
方法六: 進入頁面幾秒後轉向
<SCRIPT>
function getgoing()
{
top.location="http://49.idv.tw";
}
if (top.frames.length==0)
{
document.write("我們正為你轉換頁面");
setTimeout('getgoing()',10000);
}
</SCRIPT>
<SCRIPT>
function getgoing()
{
top.location="http://49.idv.tw";
}
if (top.frames.length==0)
{
document.write("我們正為你轉換頁面");
setTimeout('getgoing()',10000);
}
</SCRIPT>
方法七: 防止被人frame
<SCRIPT>
if (top.location != self.location)top.location=self.location;
</SCRIPT>
<SCRIPT>
if (top.location != self.location)top.location=self.location;
</SCRIPT>
方法八: 永遠都會帶著框架
<SCRIPT>
if (window == top)top.location.href = "frames.htm"; //frames.htm為框架網頁
</SCRIPT>
<SCRIPT>
if (window == top)top.location.href = "frames.htm"; //frames.htm為框架網頁
</SCRIPT>
方法九: 直接到達頁面
<SCRIPT>
if(top.usrID == null) {
location = "home.html"
}
</SCRIPT>
<SCRIPT>
if(top.usrID == null) {
location = "home.html"
}
</SCRIPT>
方法十: 框架來的被禁止!導向錯誤頁面
<SCRIPT>
if (parent.frames.length==0) window.location.replace('404.html')
</SCRIPT>
<SCRIPT>
if (parent.frames.length==0) window.location.replace('404.html')
</SCRIPT>
方法十一: ie導向全頁面
<SCRIPT>
if (window.top!=window.self) {window.top.location="tryjs_breakout.htm";}
</SCRIPT>
<SCRIPT>
if (window.top!=window.self) {window.top.location="tryjs_breakout.htm";}
</SCRIPT>
在這裡設定到達頁面 如果沒有被指定 就反回上一頁
<SCRIPT>
var validreferrals=new Array()
validreferrals[0]="1.html"
validreferrals[1]="2.html"
var passed=0
for (r=0;r<validreferrals.length;r++){
if (document.referrer.indexOf(validreferrals[r])!=-1){
passed=1
break
}
}
if (passed==0){
alert("沒有你可以去的地方!")
history.go(-1)
}
</SCRIPT>
這裡只要你在頁面按鍵旁的H既反回設定的網址 鍵旁的值你可以自己鍵入
<script language="java script1.2">
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function backhome(e){
var targeturl="http://49.idv.tw";
if (document.layers||document.getElementById&&!document.all){
if (e.which==104||e.which==72)
window.location=targeturl
}
else if (document.all){
if (event.keyCode==104||event.keyCode==72)
window.location=targeturl
}
}
document.onkeypress=backhome
</script>
<script language="java script1.2">
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function backhome(e){
var targeturl="http://49.idv.tw";
if (document.layers||document.getElementById&&!document.all){
if (e.which==104||e.which==72)
window.location=targeturl
}
else if (document.all){
if (event.keyCode==104||event.keyCode==72)
window.location=targeturl
}
}
document.onkeypress=backhome
</script>
你可以查看目前地址的分頁地趾 例如:01.html?url=1
<SCRIPT>
href=location.href
alert(href.substring(href.lastIndexOf('.'),href.indexOf('?')))
</SCRIPT>
<SCRIPT>
href=location.href
alert(href.substring(href.lastIndexOf('.'),href.indexOf('?')))
</SCRIPT>
在這裡可以判斷你的文件名
<SCRIPT>
var strHref = window.location.href;
window.alert(strHref.replace(/^.*(\.[^\.\?]*)\??.*$/,'$1'));
</SCRIPT>
<SCRIPT>
var strHref = window.location.href;
window.alert(strHref.replace(/^.*(\.[^\.\?]*)\??.*$/,'$1'));
</SCRIPT>
得知是什麼語法來執行
<SCRIPT>
function whichElement()
{
var tname
tname=event.srcElement.tagName
alert(tname)
}
</SCRIPT>
<body onmousedown="whichElement()">
<SCRIPT>
function whichElement()
{
var tname
tname=event.srcElement.tagName
alert(tname)
}
</SCRIPT>
<body onmousedown="whichElement()">
上一頁的來源
<SCRIPT>
if (document.referrer == "" ||
document.referrer.indexOf("49.idv.tw") == -1)
document.write('test')
else
document.write('')
if (document.referrer&&document.referrer!="")
document.write('')
else
document.write('')
</SCRIPT>
<SCRIPT>
if (document.referrer == "" ||
document.referrer.indexOf("49.idv.tw") == -1)
document.write('test')
else
document.write('')
if (document.referrer&&document.referrer!="")
document.write('')
else
document.write('')
</SCRIPT>
你可以查看你通路的地趾與你目前所在地址
方法:
<SCRIPT>
alert(this.location)
</SCRIPT>
或下列URL句子
方法:
<SCRIPT>
alert(this.location)
</SCRIPT>
或下列URL句子
thisURL: [http://49.idv.tw/read.php?tid=10248&fpage=2]
thisHREF: [http://49.idv.tw/read.php?tid=10248&fpage=2]
thisSLoc: [http://49.idv.tw/read.php?tid=10248&fpage=2]
thisDLoc: [http://49.idv.tw/read.php?tid=10248&fpage=2]
thisDLoc = document.location;
thisURL = document.URL;
thisHREF = document.location.href;
thisSLoc = self.location.href;
thisTLoc: [http://49.idv.tw/read.php?tid=10248&fpage=2]
thisPLoc: [http://49.idv.tw/read.php?tid=10248&fpage=2]
thisTHost: [49.idv.tw]
thisHost: [49.idv.tw]
thisTLoc = top.location.href;
thisPLoc = parent.document.location;
thisTHost = top.location.hostname;
thisHost = location.hostname;
thisHPage: [read.php?tid=10248&fpage=2]
thisUPage: [read.php?tid=10248&fpage=2]
tmpHPage = thisHREF.split( "/" );
thisHPage = tmpHPage[ tmpHPage.length-1 ];
tmpUPage = thisURL.split( "/" );
thisUPage = tmpUPage[ tmpUPage.length-1 ];
hrefhttp://49.idv.tw/read.php?tid=10248&fpage=2
protocolhttp:
hostname49.idv.tw
host49.idv.tw
port
pathname/read.php
search?tid=10248&fpage=2
hash
<script>
with (document) {
write("<table border=1>");
write("<td width=30%>href</td><td width=70%>"
+ location.href + "</td><tr>");
write("<td>protocol</td><td>"
+ location.protocol + "<td><tr>");
write("<td>hostname</td><td>"
+ location.hostname + "</td><tr>");
write("<td>host</td><td>"
+ location.host + "</td><tr>");
write("<td>port</td><td>"
+ location.port + "</td><tr>");
write("<td>pathname</td><td>"
+ location.pathname + "</td><tr>");
write("<td>search</td><td>"
+ location.search + "</td><tr>");
write("<td>hash</td><td>"
+ location.hash + "</td><tr>");
write("</table>");
}
</script>
全站熱搜
留言列表