設置或獲取對象指定的文件名或路徑。 window.location.pathname例:http://localhost:8086/topic/index?topicId=361alert(window.location.pathname); 則輸出:/topic/index設置或獲取整個 ...
設置或獲取對象指定的文件名或路徑。 window.location.pathname例:http://localhost:8086/topic/index?topicId=361alert(window.location.pathname); 則輸出:/topic/index設置或獲取整個 ...
//獲取多個地址欄信息,name為地址欄參數名,可以傳遞多個參數 // 形式為 .html?id=12&a=2 function getQueryString(name){ var reg = new RegExp("(^|&)"+ name ...
有的時候需要獲取頁面名稱,為此我在這里封裝了一個方。 一、分別根據傳遞不同的參數,獲取到html頁面的名稱。 通過傳遞參數,獲取到html頁面的名稱;參數params 以下是參數解釋說明 (1)params=1,只獲取頁面名稱,不帶.html后綴 1.1 例如 url ...
獲取上一個頁面的一個URL,這個URL一般做一個頁面的跳轉 window.location.href <script>window.location.href="http://www.baidu.com"</script> 獲取一個頁面的主機名 ...
當前url:http://localhost:8080/CarsiLogCenter_new/idpstat.jsp?action=idp.sptopn request.getRe ...
//獲取URL參數function getQueryString(name) { var reg = new RegExp("(^|/?|&)" + name + "=([^&]*)(&|$)", "i"); var r = decodeURIComponent ...
...
function GetRequest() { var url = location.search; var theRequest = new Object(); if (url.indexOf("? ...