function getUrlParam(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&#]"+name+"=([^\\?&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
return results == null ? '' : results[1];
}
Чистый JavaScript ...