Get URL Variables

/ Published in: JavaScript
Save to your folder(s)

Read a page's GET URL variables and return them as an associative array.


Example for URL

var hash = getUrlVars();
alert(hash['hello']); // prints 'bonjour'
alert(hash['goodevening']); // prints 'bonsoir'

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.