<script type = "text/javaScript">
thisUrl = document.url;
thishref = document.location.href;
thisSloc = self.location.href;
thisDLOC = document.location;
strwrite = "thisurl: [" + thaturl + "] <r />"
strwrite + = "thishref: [" + thathref + "] <r />"
strwrite + = "thisSloc: [" + thisSloc + "] <r />"
strwrite + = "thisDloc: [" + thisDloc + "] <r />"
document.write (strwrite);
thattloc = top.location.href;
thisPloc = parent.document.location;
thisthost = top.location.hostName;
thishost = ubicación.hostName;
strwrite = "thattloc: [" + thattloc + "] <r />"
strwrite + = "thisPloc: [" + thisPloc + "] <r />"
strwrite + = "thisthost: [" + thisthost + "] <r />"
strwrite + = "thishost: [" + thishost + "] <r />"
document.write (strwrite);
tmphpage = thishref.split ("/");
thathpage = tmphpage [tmphpage.length-1];
tmpupage = thaturl.split ("/");
thisUpage = tmpupage [tmpupage.length-1];
strwrite = "thishpage: [" + thathpage + "] <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 ()