URL.hash
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2015ë 11ì.
URL ì¸í°íì´ì¤ì hash ìì±ì 맨 ìì '#'ê³¼ í¨ê» URLì íëê·¸ë¨¼í¸ ìë³ì를 ë´ê³ ìë USVStringì
ëë¤.
íë그먼í¸ìë í¼ì¼í¸ ëì½ë©ì ì ì©íì§ ììµëë¤. URLì´ íëê·¸ë¨¼í¸ ìë³ì를 í¬í¨íì§ ìì ê²½ì° ë¹ ë¬¸ìì´ì ë°íí©ëë¤.
ì°¸ê³ : ì´ ê¸°ë¥ì Web Workerìì ì¬ì©í ì ììµëë¤.
구문
js
const string = url.hash;
url.hash = newHash;
ê°
ìì
js
const url = new URL(
"https://developer.mozilla.org/ko/docs/Web/API/URL/href#ìì ",
);
console.log(url.hash); // Logs: '#ìì '
ëª ì¸
| Specification |
|---|
| URL > # dom-url-hash > |
ë¸ë¼ì°ì í¸íì±
ê°ì´ 보기
- ìì±ì´ ìí
URLì¸í°íì´ì¤.