DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

I am a tech curator at DZone, and I am always looking for interesting stories to read and post. Ross has posted 64 posts at DZone. You can read more from them at their website. View Full User Profile

Get URL Parameters

  • submit to reddit
function getURLParameter(name){
  return decodeURI(
    (RegEXP(name + '=' + '(.+?)(&|$)').exec(||[,null])[1]
This function takes the name of your parameter as a string and returns it's value as set in the current URL.