-
[JAVASCRIPT] - 주소창의 parameter 제거HTML + JAVASCRIPT + CSS 2017. 3. 9. 10:42728x90
[JAVASCRIPT] - 주소창의 parameter 제거
보통은 주소창에 parameter 값이 다음과 같이 표출된다.
https://lahuman.github.io/posts/?lang=ko
이때 해당 주소에서 parameter 값만 제거 하고 싶을 경우 다음의 스크립트를 이용하면 간단히 처리 할 수 있다.
history.replaceState({}, null, location.pathname);
parameter가 제거된 값은 다음과 같다.
https://lahuman.github.io/posts/
728x90'HTML + JAVASCRIPT + CSS' 카테고리의 다른 글
How to fix this is undefined in Vue. (0) 2019.02.06 D3] TEXT 태그를 wraping하여 라벨 나누기 (0) 2018.08.17 Array.prototype.reduce VS for loop (0) 2015.09.22 [jsGantt]간트 차트 라이브러리 (0) 2014.09.03 requirejs 란 - 모듈정의, 모듈 로더 (0) 2014.08.29