function parseQueryString(url) { var pos; var obj = {}; if ((pos = url.indexOf("?")) != -1) { var param = url.substring(pos+1, url.length - 1) var paramArr = param.split('&'); var keyValue = []; for (var i = 0, l = paramArr.length; i < l;…
var UrlArgent = { Parsed: false, //是否已解析 Cache: {}, //缓存值 ParseArg: function () { // 解析地址栏的参数值 UrlArgent.Parsed = true; var url = location.search; if (-1 == url.indexOf('?')) return; var args = url.substr(1).split("&"); for (var i = 0; i <…
一.js修改地址栏URL参数 function changeURLPar(destiny, par, par_value) { var pattern = par + '=([^&]*)'; var replaceText = par + '=' + par_value; if (destiny.match(pattern)) { var tmp = '/\\' + par + '=[^&]*/'; tmp = destiny.replace(eval(tmp), replaceText)…