방법 - JavaScript로 현재 URL 가져오기
JavaScript로 현재 URL을 가져오는 방법을 알아보세요.
현재 URL
window.location.href
현재 URL 주소를 가져오는 데 사용 :
예시
document.getElementById("demo").innerHTML =
"The full URL of this page
is:<br>" + window.location.href;
JavaScript 창 위치 튜토리얼window.location
에서 객체에 대해 자세히 읽어보세요 .