<script type = "text / javascript">
thisUrl = document.url;
thisHref = document.location.href;
thisSloc = self.location.href;
thisDloc = document.location;
strwrite = "thisUrl: [" + thisUrl + "] <br />"
strwrite + = "thathref: [" + thathref + "] <r />"
strwrite + = "ceci: [" + ceci + "] <br />"
strwrite + = "thisdloc: [" + thisdloc + "] <br />"
Document.Write (Strwrite);
thattloc = top.location.href;
thisPloc = parent.Document.location;
thisThost = top.location.hostname;
thatHost = location.hostname;
strwrite = "thattloc: [" + thattloc + "] <br />"
strwrite + = "thisploc: [" + thisploc + "] <r />"
strwrite + = "thisthost: [" + thisthost + "] <br />"
strwrite + = "thishost: [" + thathost + "] <r />"
Document.Write (Strwrite);
tmphPage = thatHref.split ("/");
thatHPage = tmphPage [tmphpage.length-1];
tmpupage = thisUrl.split ("/");
thisupage = tmpupage [tmpupage.length-1];
strwrite = "thathpage: [" + thathpage + "] <br />"
strwrite + = "thisupage: [" + thisupage + "] <br />"
Document.Write (Strwrite);
var url = "<% = request.getRequesturi ()%>";
alerte (URL)
</cript>
request.getRequeSturi ();
request.getRequestUrl ();
request.getQueryString ();
request.getServletPath ()
可以得到自己的网络地址 : request.getscheme () + ": //" + request.getServerName () + ":" + request.getServerport () + request.getRequesturi ()