📜  在 javascript 代码示例中获取 $_get

📅  最后修改于: 2022-03-11 15:02:06.655000             🧑  作者: Mango

代码示例1
var parts = window.location.search.substr(1).split("&");
var $_GET = {};
for (var i = 0; i < parts.length; i++) {
    var temp = parts[i].split("=");
    $_GET[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
}

console.log($_GET['query'])