Baseline Widely available *
Location
ì¸í°íì´ì¤ë ê°ì²´ê° ì°ê²°ë ì¥ì(URL)를 ííí©ëë¤. Location
ì¸í°íì´ì¤ì ë³ê²½ì ê°íë©´ ì°ê²°ë ê°ì²´ìë ë°ìëëë°, Document
ì Window
ì¸í°íì´ì¤ê° ì´ë° Location
ì ê°ì§ê³ ììµëë¤. ê°ê° Document.location
ê³¼ Window.location
ì¼ë¡ ì ê·¼í ì ììµëë¤.
Location
ì¸í°íì´ì¤ë ì무 ìì±ë ììíì§ ìì§ë§, URLUtils
ì ìì±ì 구íí©ëë¤.
Location.href
ì¨ì í URLì ê°ì¼ë¡ íë DOMString
ì
ëë¤. ë°ë ê²½ì° ì°ê²°ë 문ìë ìë¡ì´ íì´ì§ë¡ ì´ëí©ëë¤. ì°ê²°ë 문ìì ë¤ë¥¸ ì¤ë¦¬ì§ììë ì¤ì í ì ììµëë¤.
Location.protocol
URLì íë¡í ì½ ë¶ë¶ì ê°ì¼ë¡ íë DOMString
ì¼ë¡, ë§ì§ë§ì ':'
ë í¬í¨í©ëë¤.
Location.host
URLì í¸ì¤í¸ ë¶ë¶ì ê°ì¼ë¡ íë DOMString
ì¼ë¡, í¸ì¤í¸ëª
, ':'
, í¬í¸ ë²í¸ë¥¼ í¬í¨í©ëë¤.
Location.hostname
URLì ëë©ì¸ ë¶ë¶ì ê°ì¼ë¡ íë DOMString
ì
ëë¤.
Location.port
URLì í¬í¸ ë²í¸ë¥¼ ê°ì¼ë¡ íë DOMString
ì
ëë¤.
Location.pathname
'/'
문ì ë¤ URLì ê²½ë¡ë¥¼ ê°ì¼ë¡ íë DOMString
ì
ëë¤.
Location.search
'?'
문ì ë¤ URLì 쿼리ì¤í¸ë§ì ê°ì¼ë¡ íë DOMString
ì
ëë¤. 모ë ë¸ë¼ì°ì ììë URLSearchParams.get()
ê³¼ URL.searchParams
를 ì¬ì©í´ì ì¸ì를 ì½ê² ì¶ì¶í ì ììµëë¤.
Location.hash
'#'
문ì ë¤ URLì íëê·¸ë¨¼í¸ ìë³ì를 ê°ì¼ë¡ íë DOMString
ì
ëë¤.
Location.username
ëë©ì¸ ì´ë¦ ì´ì ì ëª
ìë ì¬ì©ìëª
ì ê°ì¼ë¡ íë DOMString
ì
ëë¤.
Location.password
ëë©ì¸ ì´ë¦ ì´ì ì ëª
ìë ë¹ë°ë²í¸ë¥¼ ê°ì¼ë¡ íë DOMString
ì
ëë¤.
Location.origin
ì½ê¸° ì ì©
ì§ì í ì¥ì ì¤ë¦¬ì§ì íì¤ íí를 ê°ì¼ë¡ íë DOMString
ì
ëë¤.
Location
ì¸í°íì´ì¤ë ì무 ë©ìëë ììíì§ ìì§ë§, URLUtils
ì ë©ìë를 구íí©ëë¤.
Location.assign()
주ì´ì§ URLì 리ìì¤ë¥¼ ë¶ë¬ìµëë¤.
Location.reload()
íì¬ URLì 리ìì¤ë¥¼ ë¤ì ë¶ë¬ìµëë¤. ì íì ì¼ë¡ 매ê°ë³ìì true
를 ì ê³µí´ ë¸ë¼ì°ì ìºì를 무ìíê³ ìë²ìì ìë¡ ë¶ë¬ì¬ ì ììµëë¤,
Location.replace()
Replaces the current resource with the one at the provided URL. The difference from the assign()
method is that after using replace()
the current page will not be saved in session History
, meaning the user won't be able to use the back button to navigate to it.
Location.toString()
Returns a DOMString
containing the whole URL. It is a synonym for URLUtils.href
, though it can't be used to modify the value.
// Create anchor element and use href property for the purpose of this example
// A more correct alternative is to browse to the URL and use document.location or window.location
var url = document.createElement("a");
url.href =
"https://developer.mozilla.org:8080/en-US/search?q=URL#search-results-close-container";
console.log(url.href); // https://developer.mozilla.org:8080/en-US/search?q=URL#search-results-close-container
console.log(url.protocol); // https:
console.log(url.host); // developer.mozilla.org:8080
console.log(url.hostname); // developer.mozilla.org
console.log(url.port); // 8080
console.log(url.pathname); // /en-US/search
console.log(url.search); // ?q=URL
console.log(url.hash); // #search-results-close-container
console.log(url.origin); // https://developer.mozilla.org:8080
ëª
ì¸ ë¸ë¼ì°ì í¸íì± ê°ì´ 보기
Window.location
and Document.location
.URL
, URLSearchParams
and HTMLHyperlinkElementUtils
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4