1 2 3 4 5 6 7 | <script> document.write(window.location.href+"<br>"); document.write(window.location.hostname+"<br>"); document.write(window.location.pathname+"<br>"); document.write(window.location.protocol+"<br>"); document.write(window.location.assign+"<br>"); </script> | cs |
window.location.href : 현재 풀URL 주소 반환(http://localhost:20080/Chapter3/ServerVariables.asp)
window.location.hostname : 현재 도메인주소값만 반환(localhost)
window.location.pathname : 현재 path 경로와 파일명 반환(/Chapter3/ServerVariables.asp)
window.location.protocol : 현재 웹 프로토콜 스키마값 반환(http 또는 https)
댓글