Over a million developers have joined DZone.

Get URL Parameters

·
This function takes the name of your parameter as a string and returns it's value as set in the current URL.
function getURLParameter(name){
  return decodeURI(
    (RegEXP(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
  );
}
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}