<script type = "text/javascript">
theurl = document.url;
thishref = document.location.href;
thissloc = self.Location.href;
thisdloc = document.Location;
strwrite = "theurl: [" + theurl + "] <r />"
strwrite + = "thisHref: [" + thisHref + "] <r />"
strwrite + = "thissloc: [" + thissloc + "] <r />"
strwrite + = "thisDloc: [" + thisDloc + "] <r />"
document.write (strwrite);
thistloc = top.location.href;
thisploc = parent.document.location;
thisthost = top.Location.HostName;
thisHost = location.hostname;
strwrite = "thistloc: [" + thistloc + "] <r />"
strwrite + = "thisploc: [" + thisploc + "] <r />"
strwrite + = "ThisHost: [" + thisThost + "] <r />"
strwrite + = "thisHost: [" + thisHost + "] <r />"
document.write (strwrite);
tmphpage = thishref.split ("/");
thishpage = tmphpage [tmphpage.length-1];
tmpupage = theurl.split ("/");
thisupage = tmpupage [tmpupage.length-1];
strwrite = "thishpage: [" + thishpage + "] <r />"
strwrite + = "Thisupage: [" + thisupage + "] <r />"
document.write (strwrite);
var url = "<%= request.getRequesturi ()%>";
Alerta (URL)
</script>
request.getRequesturi ();
request.getRequesturl ();
request.getQueryString ();
request.getServletPath ()
可以得到自己的网络地址: request.getScheme ()+": //"+request.getServername ()+":"+request.getServerport ()+request.getRequesturi ()