function changeURLPar(url
var str = "";
if (url
str = url
else
return url + "?" + ref + "=" + value;
var returnurl = "";
var setparam = "";
var arr;
var modify = "
if (str
arr = str
for (i in arr) {
if (arr[i]
setparam = value;
modify = "
}
else {
setparam = arr[i]
}
returnurl = returnurl + arr[i]
}
returnurl = returnurl
if (modify == "
if (returnurl == str)
returnurl = returnurl + "&" + ref + "=" + value;
}
else {
if (str
arr = str
if (arr[
setparam = value;
modify = "
}
else {
setparam = arr[
}
returnurl = arr[
if (modify == "
if (returnurl == str)
returnurl = returnurl + "&" + ref + "=" + value;
}
else
returnurl = ref + "=" + value;
}
return url
}
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20032.html