2012. 8. 20. 17:10
반응형

현재 url정보를 담고 있는 javascript 소개

- window.location

현재 url에 대한 풀 주소

- window.location.hostname

도메인에 대한 정보

- window.location.pathname

현재 페이지에 대한 정보

- window.location.search

get 방식으로 넘어온 파라미터 정보


window.location = "http://" + window.location.hostname + window.location.pathname + window.location.search



반응형

'Front-Html > Javascript' 카테고리의 다른 글

String.fromCharCode  (0) 2014.03.13
모바일기기로 접속시 해당 url로 이동 처리  (1) 2012.08.22
jquery의 분석  (2) 2011.12.14
다음 Map Open API 설정  (5) 2011.03.21
javascript php 문자열 관련 함수 비교  (2) 2010.04.09
Posted by seongsland