注冊|登錄

聯系電話:024-31891684  13390130939
日志

沈陽軟件開發_沈陽軟件公司_沈陽軟件定制/軟件/日志

Log日志

js獲取當前Url網址路徑及參數

瀏覽量:2071

http://localhost:81/Test/1.htm?Did=123
<br>以下為輸出:
<br>
<SCRIPT>
//獲取Url傳過來的值
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>

 

沈陽團購網|營口網站制作|沈陽軟件公司|軟件定制|網站建設|加盟易勢|提交問題

主站蜘蛛池模板: ankhazone度盘| 亚洲人成黄网在线观看| 色婷婷五月综合丁香中文字幕| 国产精品亚洲综合一区在线观看| japanese老熟妇乱子伦视频| 无码精品a∨在线观看无广告 | 亚洲精品无码不卡| 综合亚洲伊人午夜网| 国产区图片区小说区亚洲区| 亚洲欧美日韩国产一区图片 | 中文字幕不卡在线| 日韩一区二区三区不卡视频| 亚洲人成7777影视在线观看| 欧美精品videosbestsexhd4k| 免费一级毛片完整版在线看| 美女被免费网站视频在线| 国产区图片区小说区亚洲区| 韩国成人在线视频| 国产精品刺激好大好爽视频 | 6080午夜乱理伦片| 大竹一重足舐男未删减版| 一区二区国产在线播放| 成年女人a毛片免费视频| 国产丝袜制服在线| 国产精品网址你懂的| 国产精品国产三级国快看| 99久久中文字幕伊人| 夫妇交换性三中文字幕| 一级美国片免费看| 护士与税务干部完整2av| 亚洲欧美日韩中文字幕在线| 男人用嘴添女人下身免费视频| 午夜毛片免费看| 美女污污视频网站| 国产va免费精品观看精品| 青楼18春一级毛片| 国产大片黄在线观看| 91资源在线播放| 国产手机精品一区二区| 日韩爱爱小视频| 国产真实乱子伦xxxx仙踪|