Get URL Variables


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

Example URL:
http://www.example.com/index.php?id=1&image=awesome.jpg

getQueryVariable(”id”) – would return “1″.
Calling getQueryVariable(”image”) – would return “awesome.jpg”.

URL: http://css-tricks.com/snippets/javascript/get-url-variables/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.