1. function GetURLparam(name){
  2. var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
  3. var r = window.location.search.substr(1).match(reg);
  4. if(r!=null)return unescape(r[2]); return null;
  5. }
  6. GetURLparam('想要获取的参数名');