标签:
1 <!-- 第一种--> 2 <script language="javascript" type="text/javascript"> 3 window.location.href="jb51.jsp?backurl="+window.location.href; 4 </script> 5 6 <!-- 第二种--> 7 <script language="javascript"> 8 alert("返回"); 9 window.history.back(-1); 10 </script> 11 12 <!-- 第三种--> 13 <script language="javascript"> 14 window.navigate("jb51.jsp"); 15 </script> 16 17 <!-- 第四种--> 18 <script language="JavaScript"> 19 self.location=‘jb51.htm‘; 20 </script> 21 22 <!-- 第五种--> 23 <script language="javascript"> 24 alert("非法访问!"); 25 top.location=‘jb51.jsp‘; 26 </script> 27 28 <!-- 网址从传参获得并转向--> 29 <script language="javascript" type="text/javascript"> 30 function request(paras){ 31 var url = location.href; 32 var paraString = url.substring(url.indexOf("?")+1,url.length).split("&"); 33 var paraObj = {} 34 for (i=0; j=paraString[i]; i++){ 35 paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=")+1,j.length); 36 } 37 var returnValue = paraObj[paras.toLowerCase()]; 38 if(typeof(returnValue)=="undefined"){ 39 return ""; 40 }else{ 41 return returnValue; 42 } 43 } 44 var theurl 45 theurl=request("url"); 46 if (theurl!=‘‘){ 47 location=theurl 48 } 49 </script>
转自:http://www.jb51.net/article/25403.htm
标签:
原文地址:http://www.cnblogs.com/gould-david/p/5671099.html