function getparam(paramname) {
paramvalue = ;
isfound = false;
if (this.location.search.indexof(?) == 0 && this.location.search.indexof(=) > 1) {
arrsource = unescape(this.location.search).substring(1, this.location.search.length).split(&);
i = 0;
while (i if (arrsource[i].indexof(=) > 0) {
if (arrsource[i].split(=)[0].tolowercase() == paramname.tolowercase()) {
paramvalue = arrsource[i].split(=)[1];
isfound = true;
}
}
i++;
}
}
return paramvalue;
}
如:http://www.jb51.net/userquery.aspx?id=202
getparam(id)为202
