Do the project need to use the JS get get parameters, the Internet to find a bit, find the following plug-in:
For example, your current URL is:
http://www.xxx.com/index.php?test=1&kk=2
If you want to get test, you can introduce a plugin,
Use the following methods to obtain:
var test = $.query.get (' test ');
If the parameter has more than one name, you can:
var arr = $.query.get (' testy ');
Output: [value 1, Value 2, value 3 ...]
If you want to get more than one of the same names, you can:
var arrayelement = $.query.get (' testy[1] ');
This plugin can not only get parameters, but also set parameters.
Set a parameter:
var newurl = $.query.set ("section", 5). ToString ();
Output: "? section=5"
Set two parameters:
var newurl = $.query.set ("section", 5). Set ("Action", "Do"). ToString ();
Output: "? action=do§ion=5"
To delete a parameter:
var oldqueryagain = $.query. REMOVE ("type");
Clear All Parameters:
var emptyquery = $.query.empty ();
Copy all parameters:
var stillthesame = $.query.copy ();
Plugin Address:
Http://plugins.jquery.com/project/query-object
jquery plugin-Get URL parameters