var _GET={};
for(var m, v=location.href.split(/[?&]/), k=v.length-1;k>0;k--)
_GET[(m=v[k].split(/[=#]/))[0].toLowerCase()] = m.length>1?decodeURI(m[1]):"";
example:
mypage.aspx?MyParameter=2
var param=_GET.myparameter; (always use lowercase)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment