<br>thisURL = 문서.URL; <br>thisHREF = document.location.href; <br>thisSLoc = self.location.href; <br>thisDLoc = document.location; <br>strwrite = " thisURL: [" thisURL "]<br />" <br>strwrite = " thisHREF: [" thisHREF "]<br />" <br>strwrite = " thisSLoc: [" thisSLoc "]<br />" <br>strwrite = " thisDLoc: [" thisDLoc "]<br />" <br>document.write( strwrite );</p> <p>thisTLoc = top.location.href; <br>thisPLoc = parent.document.location; <br>thisTHost = top.location.hostname; <br>thisHost = 위치.호스트 이름; <br>strwrite = " thisTLoc: [" thisTLoc "]<br />" <br>strwrite = " thisPLoc: [" thisPLoc "]<br />" <br>strwrite = " thisTHost: [" thisTHost "]<br />" <br>strwrite = " thisHost: [" thisHost "]<br />" <br>document.write( strwrite ); </p> <p>tmpHPage = thisHREF.split( "/" ); <br>thisHPage = tmpHPage[ tmpHPage.length-1 ]; <br>tmpUPage = thisURL.split( "/" ); <br>thisUPage = tmpUPage[ tmpUPage.length-1 ]; <br>strwrite = " thisHPage: [" thisHPage "]<br />" <br>strwrite = " thisUPage: [" thisUPage "]<br />" <br>document.write( strwrite ); <br>var url="<%=request.getRequestURI()%>";<br>alert(url)<br> request.getRequestURI();request.getRequestURL();request.getQueryString(); request.getServletPath() 可以得到自己的网络地址:request.getScheme() "://" request.getServerName() ":" request.getServerPort() request.getRequestURI()