<script type = "text/javaScript">
thisurl = document.url;
thref = document.location.href;
thisSloc = self.location.href;
thisdloc = document.location;
Strwrite = "thisUrl: [" + thisurl + "] <br />"
Strwrite + = "thref: [" + thref + "] <br />"
Strwrite + = "thisSloc: [" + thisSloc + "] <br />"
Strwrite + = "thisdloc: [" + thisdloc + "] <br />"
document.write (Strwrite);
Thistloc = top.location.href;
thisploc = parent.document.location;
thostthost = top.location.hostname;
thisHost = location.hostname;
StrWrite = "Thistloc: [" + thtloc + "] <br />"
Strwrite + = "thisploc: [" + thisploc + "] <br />"
Strwrite + = "ThisThost: [" + thostThost + "] <br />"
Strwrite + = "ThisHost: [" + ThisHost + "] <br />"
document.write (Strwrite);
tmPhPage = thref.Split ("/");
thisHPage = tmphpage [tmphpage.length-1];
tmpupage = thisurl.split ("/");
thisUpage = tmpupage [tmpupage.length-1];
StrWrite = "ThisHPage: [" + thishPage + "] <br />"
Strwrite + = "ThisUpage: [" + thisUpage + "] <br />"
document.write (Strwrite);
var url = "<%= request.getRequesturi ()%>";
Alarm (URL)
</script>
request.getRequesturi ();
request.getRequesturl ();
request.getQueryString ();
request.getServletPath ()
可以得到自己的网络地址 : request.getscheme ()+": //"+request.getServername ()+":"+request.getServerport ()+request.getRequesturi ()