标签:
window.getRequest = function (url) { var theRequest = new Array(); if (url.indexOf("?") > -1) { var pair = url.substr(1).split("&"); for (var i = 0; i < pair.length; i++) { var key = pair[i].split("=")[0]; var value = decodeURI(pair[i].split("=")[1]); var item = { key: value} theRequest.push(item); //theRequest[pair[i].split("=")[0]] = decodeURI(pair[i].split("=")[1]); } } return theRequest; };
标签:
原文地址:http://www.cnblogs.com/liuxiaoji/p/4599568.html