파닥이

[javascript] URL에서 parameter 제거하기 본문

IT/JavaScript

[javascript] URL에서 parameter 제거하기

알라이또 2019. 3. 25. 21:45
반응형
백업

https://ini8262.tistory.com?key=aaa

해당 URL에서 parameter값만 지우고 싶을때

history.replaceState({}, null, location.pathname);

결과값은 아래와 같다.

https://ini8262.tistory.com

참고 History API

Comments