js parses URL parameters:
url format: a=123&b=234
getUrlParam(name) { // Parse URL parameters var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var locationHref = decodeURIComponent(window.location.search); var r = locationHref.substr(1).match(reg); if(r != null) { if(unescape){ return unescape(r[2]); }else{ return r[2]; } }else{ return null; } },
usage:
To get the value of the parameter from the url, pass the corresponding parameter name in the method to return the parameter value.