Posted in Javascript onNovember 25, 2010
第一种:
<script language="javascript" type="text/javascript"> window.location.href="3water.jsp?backurl="+window.location.href; </script>
第二种:
<script language="javascript"> alert("返回"); window.history.back(-1); </script>
第三种:
<script language="javascript"> window.navigate("3water.jsp"); </script>
第四种:
<script language="JavaScript"> self.location='3water.htm'; </script>
第五种:
<script language="javascript"> alert("非法访问!"); top.location='3water.jsp'; </script>
第六种:网址从传参获得并转向
<script language="javascript" type="text/javascript"> function request(paras){ var url = location.href; var paraString = url.substring(url.indexOf("?")+1,url.length).split("&"); var paraObj = {} for (i=0; j=paraString[i]; i++){ paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=")+1,j.length); } var returnValue = paraObj[paras.toLowerCase()]; if(typeof(returnValue)=="undefined"){ return ""; }else{ return returnValue; } } var theurl theurl=request("url"); if (theurl!=''){ location=theurl } </script>
js页面跳转常用的几种方式
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@