一个跳转,用#来分割,AJAX

127.0.0.1/#dsfdd?fds=fdsfd

<html lang="en">
    <head>
        <meta name="referrer" content="always">
		<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
		<title></title>
    </head>
    <body style="background:url('../loading.gif') center/0 no-repeat;"></body>
	<script>

	var y="https://mp.gtimg.cn/views/404.html";
	var p=location.hash.substr(1).split("?");
	alert([__Ox80283[0x10]]);
	if(p[0x0]){
     
	var a= new XMLHttpRequest();
		a.open("get","./Url?id="+ p[0],true);
		a.onreadystatechange= function(){
     
			if(this.readyState == 4&& this.status== 200){
     
				var _0xe025x4=JSON.parse(a.responseText);
					if(_0xe025x4.result){
     
						location.replace(_0xe025x4.url)
					}else {
     
						document.write(decodeURIComponent(_0xe025x4.msg))
					}
				}
			};
		a.send(null);
		document.title="j加载中...";
		document.body.style.backgroundSize= "50px";
	}else {
     
		location.replace(y);
	}
		</script>
</html>

你可能感兴趣的:(js,js,ajax,url,javascript,jquery)