This question already has an answer here:
- How can I get query string values in JavaScript? 73 answers
Code:
window.location.href = "Posts?Category=" + sel;
How to get the value in Category page?
This question already has an answer here:
Code:
window.location.href = "Posts?Category=" + sel;
How to get the value in Category page?
Try this:
function getURLParameter(name, urlsearch) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(urlsearch || location.search) || [ , "" ])[1].replace(
/\+/g, '%20'))
|| null;
}
var url = "Posts?Category=1134324";
alert(getURLParameter('Category', url));
http://jsfiddle.net/kL9DJ/