/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getQSP() { var qs = location.search.substring(1, location.search.length); var args = qs.split("&"); var vals= []; for (var i=0; i < args.length; i++) { var nameVal = args[i].split("="); var temp = unescape(nameVal[1]).split('+'); nameVal[1] = temp.join(' '); vals[nameVal[0]] = nameVal[1]; } return vals; }