Home > Article > Web Front-end > A small example of jQuery getting the GET parameter value of the URL_jquery
// * var GET = $.urlGet(); //Get the Get parameters of the URL
// * var id = GET['id']; //Get the id Value
// * > // Public
// Return array ()
//
Urlget: function ()
{
var aquery = window.location.href.split ("?");/ /Get Get parameters
var aGET = new Array();
if(aQuery.length > 1)
var aBuf = aQuery[1].split("&"); for (var I = 0, Iloop = Abuf.length; I & lt; Iloop; i)
{
var aTMP = abuf [i] .split ("="); // separate key and value
aGET[aTmp[0]] = aTmp[1];
🎜> });
})(jQuery);