티스토리 뷰
window.location 개체.
location 개체는 현재 URL 에 대한 정보를 포함하고 있다.
Location Object Properties |
|
Property |
Description |
hash |
URL 경로 중 해쉬(#) 부분을 반환 |
host |
URL 경로 중 hostname 과 port 번호를 반환 |
hostname |
URL 경로 중 hostname 을 반환 |
href |
URL 전체 경로를 반환 |
origin |
URL 경로 중 hostname 과 port 번호 및 protocol 을 반환 |
pathname |
URL 경로 중 path name 을 반환 |
protocol |
URL 경로 중 protocol 을 반환 |
search |
URL 경로 중 querystring 을 반환 |
Location Object Methods |
|
Method |
Description |
assign() |
Loads a new document |
reload() |
Reloads the current document |
replace() |
Replaces the current document with a new one |
참조 : http://www.w3schools.com/jsref/obj_location.asp
'Javascript > 기타' 카테고리의 다른 글
SQLite 설치 (0) | 2019.08.14 |
---|
댓글