Body:

<a href="home.html? Id = 1 "> < / a > jumpCopy the code

home.html

<script type="text/javascript"> var a=GetRequest(); Console. log("id:"+a['id']) function GetRequest() {var url = location.search; // Get the "?" in the url Var theRequest = new Object(); if (url.indexOf("?" )! = -1) { var str = url.substr(1); strs = str.split("&"); for (var i = 0; i < strs.length; i++) { theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]); } } return theRequest; } </script>Copy the code