$.urlParam =function(name){varresults =newRegExp('[\?&]'+ name +'=([^&#]*)').exec(window.location.href);if(results==null){returnnull;}else{returnresults[1] || 0;}}console.log($.urlParam('param1'));
References :
Get URL parameters using jQuery