Home >Web Front-end >JS Tutorial >Several common ways to jump to js pages_javascript skills

Several common ways to jump to js pages_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:15:281052browse

The first type:

Copy code The code is as follows:



No. Two types:
Copy code The code is as follows:



Third type:
Copy code The code is as follows:



Fourth:
Copy code The code is as follows:



The fifth type:
Copy code The code is as follows:

< script language="javascript">
alert("Illegal access!");
top.location='jb51.jsp';


Type 6: The URL is obtained from the passed parameters and redirected to
Copy code The code is as follows:

< ;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
}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn