获取URL参数

 //获取工单数据
 var args = new Object();
 args = GetUrlParms();
 var judgeID = args["JudgeID"];
 
 //获取url参数
 function GetUrlParms() {
      var args = new Object(); 
      var query = location.search.substring(1);
      var pairs = query.split("&");
for (var i = 0; i < pairs.length; i++) { var pos = pairs[i].indexOf('='); if (pos == -1) continue; var argname = pairs[i].substring(0, pos); var value = pairs[i].substring(pos + 1); args[argname] = decodeURI(value); //存为属性 } return args; }
posted @ 2017-02-04 22:00  欧欧欧锋_  阅读(136)  评论(0编辑  收藏  举报