注冊(cè)|登錄

聯(lián)系電話:024-31891684  13390130939
日志

沈陽(yáng)軟件開(kāi)發(fā)_沈陽(yáng)軟件公司_沈陽(yáng)軟件定制/軟件/日志

Log日志

js獲取當(dāng)前Url網(wǎng)址路徑及參數(shù)

瀏覽量:2072

http://localhost:81/Test/1.htm?Did=123
<br>以下為輸出:
<br>
<SCRIPT>
//獲取Url傳過(guò)來(lái)的值
function Request(name)
{
     new RegExp("(^|&)"+name+"=([^&]*)").exec(window.location.search.substr(1));
     return RegExp.$2
}

thisURL = document.URL;     // http://localhost:81/Test/1.htm?Did=123
thisHREF = document.location.href; // http://localhost:81/Test/1.htm?Did=123
thisSLoc = self.location.href;   // http://localhost:81/Test/1.htm?Did=123
thisDLoc = document.location;   // http://localhost:81/Test/1.htm?Did=123

thisTLoc = top.location.href;   // http://localhost:81/Test/1.htm?Did=123
thisPLoc = parent.document.location;// http://localhost:81/Test/1.htm?Did=123
thisTHost = top.location.hostname; // localhost
thisHost = location.hostname;   // localhost

thisU1 = window.location.protocol; // http:
thisU2 = window.location.host;   // localhost:81
thisU3 = window.location.pathname; // /Test/1.htm

document.writeln( thisURL + "<br />"); 
document.writeln( thisHREF + "<br />"); 
document.writeln( thisSLoc + "<br />"); 
document.writeln( thisDLoc + "<br />");

document.writeln( thisTLoc + "<br />"); 
document.writeln( thisPLoc + "<br />"); 
document.writeln( thisTHost + "<br />"); 
document.writeln( thisHost + "<br />");

document.writeln( thisU1 + "<br />"); 
document.writeln( thisU2 + "<br />"); 
document.writeln( thisU3 + "<br />");

document.writeln( "Did="+Request("Did") );// Did=123 
</SCRIPT>

 

沈陽(yáng)團(tuán)購(gòu)網(wǎng)|營(yíng)口網(wǎng)站制作|沈陽(yáng)軟件公司|軟件定制|網(wǎng)站建設(shè)|加盟易勢(shì)|提交問(wèn)題

主站蜘蛛池模板: 国产香蕉一区二区在线网站 | 国产精品视频h| 一级特黄性色生活片| 日韩一卡2卡3卡4卡| 亚洲国产综合人成综合网站00| 精品亚洲麻豆1区2区3区| 国产午夜在线观看| 五月天婷婷精品视频| 国产超碰人人爽人人做人人添| 一个人免费观看视频在线中文| 无码一区二区波多野结衣播放搜索| 久久精品青草社区| 欧美亚洲另类久久综合| 亚洲精品你懂的| 男人女人做a视频| 午夜aaaaaaaaa视频在线| 色多多视频在线观看| 国产女人91精品嗷嗷嗷嗷| 69xxxx日本| 国产精品第一页第一页| 99re66热这里只有精品17| 奇米影视7777狠狠狠狠影视| 中文字幕第六页| 日本漫画全彩口工漫画绅士 | 国亚洲欧美日韩精品| 韩国成人毛片aaa黄| 国产成人麻豆tv在线观看| h视频在线观看免费| 国产麻豆剧传媒精品国产AV| jizzjizz视频| 妞干网在线播放| 一级毛片在线播放免费| 手机在线看片你懂得| 久久五月精品中文字幕| 日韩在线播放全免费| 久萆下载app下载入口| 机机对在一起30分钟软件下载| 亚洲免费电影网| 欧美另类黑人巨大videos| 亚洲成人一级电影| 欧美日韩成人在线观看|