(JavaScript) Get URL parameters using Javascript

Usage:
Let’s say we have an url: http://primera.vremenno.net?foo=yes&bar=no

var hash = getUrlVars();
alert(hash['foo']); // returns 'yes'
alert(hash['bar']); // returns 'no'

  1.  
  • Posted by on January 1st, 1970
This entry was posted in JavaScript and tagged , , , , , , , , . Bookmark the permalink. Trackbacks are closed, but you can post a comment.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Why ask?