thisURL = document.URL;
thisHREF = document.location.href;
thisSLoc = self.location.href;
thisDLoc = document.location;
strwrite = " thisURL: [" thisURL "]
""
strwrite = " thisHREF: [" thisHREF "]
""
strwrite = " thisSLoc: [" thisS " ]
""
strwrite = " thisDLoc: [" thisDLoc "]
""
document.write( strwrite );
thisTLoc = top.location.href;
thisPLoc =parent.document.location;
thisTHost = top.location.主機名稱;
thisHost = 位置.主機名稱;
strwrite = " thisTLoc: [" thisTLoc "]
""
strwrite = " thisPLoc: [" thisPLoc "]
""
strwrite = " thisTHost: [" thisTHost " ]
""
strwrite = " thisHost: [" thisHost "]
""
document.write( strwrite );
tmpHPage = thisHREF.split( "/" );
thisHPage = tmpHPage[ tmpHPage.length-1 ];
tmpUPage = thisURL.split( "/" );
thisUPage = tmpUPage[ tmpUPage.length-1 ];
strwrite = " thisHPage: ["thisHPage "]
""
strwrite = " thisUPage: ["thisUPage "]
""
document.write( strwrite );
var url="";
警報(url)
request.getRequestURI();
request.getRequestURL();
request.getQueryString();
request.getServletPath()
可以取得自己的網路位址:request.getScheme() "://" request.getServerName() ":" request.getServerPort() request.getRequestURI()