[javascript] base url 추출
javascript - base Url 추출 var getUrl = window.location; //http://www.naver.com/test console.log("전체주소 : " + getUrl); var baseUrl = getUrl .protocol + "//" + getUrl.host + "/" + getUrl.pathname.split('/')[1]; //http: console.log("getUrl .protocol : " + getUrl .protocol); //www.naver.com console.log("getUrl.host : " + getUrl.host); //test console.log("getUrl.pathname.split('/')[1] : " + getUrl.path..
2020.07.28