'asp 获取网页地址及参数
function getwebpageurl()
dim host,keyword
host = Request.ServerVariables("HTTP_HOST") '获取域名
keyword = Request.ServerVariables("QUERY_STRING") '获取参数集
variable = Request.ServerVariables("PATH_INFO") '获取网页路径
if keyword <> "" then
getwebpageurl = "http://" &host&variable&"?"&keyword
else
getwebpageurl = "http://" &host&variable
end if
end function
'js获取网页地址及参数
var url=location.search; //获取参数集
var url2 = window.location.href ; 获取全路径
if( url.indexOf("?")!=-1){
var str = url.substr(1);
strs = str.split("&");
for(var i=0;i<strs.length;i++) {
document.write(strs[i].split("=")[0] +" = "+ strs[i].split("=")[1] + "/n");
}
}