extract GET parameters from a user inputed url with javascript -


I'm looking to use javascript to extract the GET parameter from the user input url.

For example, a user enters the URL:

I can get the V parameter

'ee925OTFBCA' one As the variable

thanks advance.

this should do the trick

  // Add it somewhere available Var query = (function () {var query = {}, pair, search = location.search.substring (1) .split ("& amp;"), i = search.length; while (i--) {pair = Search [i] .split ("="); query [pair [0]] = decodericconnectant (pair [1]);} return query;}) (); It varies only once and creates an object with name / value pairs for those provided as parameters 

/ html>

Comments