프로그래밍/자바스크립트

window.location 객체

가카리 2016. 5. 5. 11:45
반응형


location.href : 현재 페이지의 href(URL)를 반환

location.hostname : 웹호스트의 도메인 이름을 반환

location.pathname : 현재 페이지의 경로와 파일 이름을 반환

location.protocol : 사용된 웹 프로토콜 반환(http:// or https://)

location.assign : 새로운 문서를 로드


출처 : http://jun.hansung.ac.kr/WP_2014/WP/lecture%20notes/JavaScript%20Window%20Location.html

반응형