common.js 400 B

1234567891011121314
  1. //地址带参数
  2. function GetRequest(){
  3. var url = location.search; //获取url中"?"符后的字串
  4. var theRequest = new Object();
  5. if (url.indexOf("?") != -1){
  6. var str = url.substr(1);
  7. strs = str.split("&");
  8. for (var i = 0; i < strs.length; i++) {
  9. theRequest[strs[i].split("=")[0]] = strs[i].split("=")[1];
  10. }
  11. }
  12. return theRequest;
  13. };