<腳本類型=“ text/javascript”>
thisurl = document.url;
thishref = document.location.href;
thissloc = self.location.href;
thisdloc = document.location;
strwrite =“ thisUrl:[“ + thisurl +”] <br />”
strwrite + =“ thishref:[“ + thishref +”] <br />”
strwrite + =“ thissloc:[“ + thissloc +”] <br />”
strwrite + =“ thisdloc:[“ + thisdloc +”] <br />”
document.Write(Strwrite);
thistloc = top.location.href;
thisploc = parent.document.location;
thisthost = top.location.hostname;
thishost = location.hostname;
strwrite =“ thistloc:[“ + thistloc +”] <br />”
strwrite + =“ thisploc:[“ + thisploc +”] <br />”
strwrite + =“ thisthost:[“ + thisthost +“] <br />”
strwrite + =“ thishost:[“ + thishost +”] <br />”
document.Write(Strwrite);
tmphpage = thishref.split(“/”);
thisHpage = tmphpage [tmphpage.length-1];
tmpupage = thisurl.split(“/”);
thisUpage = tmpupage [tmpupage.length-1];
strwrite =“ thishpage:[“ + thishpage +”] <br />”
strwrite + =“ thisupage:[“ + this -upage +”] <br />”
document.Write(Strwrite);
var url =“ <%= request.getRequesturi()%>”;
警報(URL)
</script>
request.getRequesturi();
request.getRequesturl();
request.getQueryString();
request.getServletPath()
可以得到自己的網絡地址:request.getScheme()+“://”+request.getServername()+“:”+request.getServerport()+request.getRequesturi()