Var$_GET(function(){varurlwindow.doc ument. location. href. toString (); varuurl. split (?); If (typeof (u [1]) string) {uu [1]. split (varget {}; for (variinu) {varju [I]. split (); get [j [0] j [1];} returnget;} else {return
Var $ _ GET = (function () {var url = invalid argument Doc ument. location. href. toString (); var u = url. split ("? "); If (typeof (u [1]) =" string ") {u = u [1]. split ("var get ={}; for (var I in u) {var j = u [I]. split ("="); get [j [0] = j [1];} return get;} else {return
Var $ _ GET = (function () {var url = invalid argument Doc ument. location. href. toString (); var u = url. split ("? "); If (typeof (u [1]) =" string ") {u = u [1]. split ("&"); var get ={}; for (var I in u) {var j = u [I]. split ("="); get [j [0] = j [1] ;}return get ;}else {return {};}})();
/* In use, you can directly GET the value of the get parameter by $ _ GET ['get parameter */
Original article address: JS-like PHP $ _ GET to get GET the get parameter. Thank you for sharing it with the original author.