var getRequest = function() { var url = window.location.search; var strs = []; var theRequest = new Object(); if(url.indexOf("?") != -1) { var str = url.substr(1); strs = str.split("&"); for(var i = 0; i < strs.length; i++) { theRequest[strs[i].split("=")[0]]=decodeURIComponent(strs[i].substring(strs[i].indexOf('=')+1)); } } return theRequest;};
网友评论