[javascript] url 파싱

2019. 9. 3. 14:39개발나들이/front

document.location.href.substring(document.location.href.lastIndexOf("/") + 1, document.location.href.length);


를 사용하면 요청 url의 호출 ip, port, 경로 를 제거한 값을 알 수 있다.