/ Published in: JavaScript
Usage:
URL: http://test.com/?test=true
var test = $_GET['test'];
Expand |
Embed | Plain Text
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]); }
You need to login to post a comment.
