forked from jxj666/2code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjump.html
More file actions
52 lines (47 loc) · 1.56 KB
/
jump.html
File metadata and controls
52 lines (47 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>欢迎光临</title>
</head>
<body>
<div class="flex" style="position: fixed;top: 0;bottom: 0;left: 0;right: 0; background: #fff;">
<div class="img" style='width: 66%;margin:33vh auto'>
<img src="./images/loading.gif" alt="" style="width: 100%">
</div>
</div>
<script type="text/javascript">
var params = {};
! function() {
var paramUrl = window.location.search.substr(1);
var paramStrs = paramUrl.split('&');
for (var index = 0; index < paramStrs.length; index++) {
params[paramStrs[index].split('=')[0]] = decodeURI(paramStrs[index].split('=')[1]);
}
}();
var id = params['id'];
var url = `//jxjweb.gz01.bdysite.com/2code/2code_php/url_html.php?id=${id}`;
ajax(url);
function ajax(url) {
var oAjax = new XMLHttpRequest();
oAjax.open("GET", url, true); //把要读取的参数的传过来。
oAjax.send();
oAjax.onreadystatechange = function() {
if (oAjax.readyState == 4) {
if (oAjax.status == 200) {
var url = JSON.parse(oAjax.responseText).url;
if (url.search(/\/\//) < 0) {
var url = `//${url}`;
}
window.location.assign(url);
} else {
if (fnfiled) {
console.log(oAjax.status);
}
}
}
};
}
</script>
</body>
</html>