Jquery - Get querystring value in jquery/javascript
Get querystring value in javascript or jquery...$(document).ready(function () {
function GetParameterValues(param) {
var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < url.length; i++) {
var urlparam = url[i].split('=');
if (urlparam[0] == param) {
return urlparam[1];
}
}
}
//here uid is querystring
var userId = GetParameterValues('uid');
// console.log(userId);
});
Hope this will help you.
Enjoy !!!
:)