console.log(location.href);

     console.log(location.protocol);

     console.log(location.host);

     console.log(location.serch);



http://localhost:8880/test/1/?id=1#hash


http -> protocal

localhot -> host

8880  -> port

/test/1 -> pathname

?id=1 -> search

#hash -> hash


변경도 가능


location.href = 'http://google.com/'

location.reload();



'오락기 > js' 카테고리의 다른 글

js_jquery  (0) 2017.04.06
DOM_document.query  (0) 2017.04.06
DOM_document.getElement  (0) 2017.04.06
BOM_전역객체_window  (0) 2017.04.04
Object Model  (0) 2017.04.04

+ Recent posts