最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

js獲取當(dāng)前路徑的簡(jiǎn)單示例代碼

 更新時(shí)間:2014年01月08日 09:54:30   作者:  
本篇文章主要是對(duì)js獲取當(dāng)前路徑的示例代碼進(jìn)行了介紹,需要的朋友可以過來參考下,希望對(duì)大家有所幫助

<script type="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: [" + thisUPage + "]<br />"
document.write( strwrite );
var url="<%=request.getRequestURI()%>";
alert(url)
</script>

request.getRequestURI();
request.getRequestURL();
request.getQueryString();

request.getServletPath()

可以得到自己的網(wǎng)絡(luò)地址:request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getRequestURI()

相關(guān)文章

最新評(píng)論

保山市| 湛江市| 武宣县| 大厂| 顺昌县| 彭州市| 庆元县| 正定县| 安达市| 福泉市| 太原市| 平南县| 抚顺县| 莱州市| 潮安县| 海城市| 二连浩特市| 天等县| 孟村| 石景山区| 鄱阳县| 黄浦区| 镇江市| 平南县| 钟祥市| 鹰潭市| 合山市| 兰州市| 丽水市| 乌海市| 霍林郭勒市| 合江县| 外汇| 双柏县| 永年县| 肥东县| 称多县| 辽宁省| 丽水市| 武乡县| 牟定县|