复制代码代码如下:
fungsi getParam(namaparam) {
paramNilai = "";
ditemukan = salah;
if (ini.lokasi.pencarian.indexOf("?") == 0 && ini.lokasi.pencarian.indexOf("=") > 1) {
arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&");
saya = 0;
while (i < arrSource.length && !isFound) {
jika (arrSource[i].indexOf("=") > 0) {
if (arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase()) {
paramValue = arrSource[i].split("=")[1];
ditemukan = benar;
}
}
saya++;
}
}
kembalikan paramValue;
}
如://www.VeVB.COM/UserQuery.aspx?id=202
getParam("id")为202