Answers for "get $_get in javascript"

0

get $_get in javascript

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'])
Posted by: Guest on April-16-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language