[Javascript] 1. window.location 속성 정리


안쓰면 기억이 안남

window.location

  • window.location.[‘속성’]
  • exampleURL= ‘https://developer.mozilla.org:8080/en-US/search?q=URL#search-results-close-container’


속성결과
hrefhttps://developer.mozilla.org:8080/en-US/search?q=URL#search-results-close-container
protocolhttps:
hostdeveloper.mozilla.org:8080
hostnamedeveloper.mozilla.org
port8080
pathname/en-US/search
search?q=URL
hash#search-results-close-container
originhttps://developer.mozilla.org:8080




[참고]

  • https://developer.mozilla.org/ko/docs/Web/API/Location [관련]
  • https://developer.mozilla.org/ko/docs/Web/API/URLSearchParams