From 8c36e204f463590ab86811d65f206053555f0e07 Mon Sep 17 00:00:00 2001 From: Dima Koltovych Date: Mon, 4 Oct 2021 20:14:48 +0300 Subject: (ru) Web/API/URL/hash: add translation (#2651) * (ru) Web/API/URL/hash: add translation * (ru) Web/API/URL/hash: remove redundant empty line --- files/ru/web/api/url/hash/index.md | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 files/ru/web/api/url/hash/index.md (limited to 'files/ru') diff --git a/files/ru/web/api/url/hash/index.md b/files/ru/web/api/url/hash/index.md new file mode 100644 index 0000000000..ccefa979bd --- /dev/null +++ b/files/ru/web/api/url/hash/index.md @@ -0,0 +1,50 @@ +--- +title: URL.hash +slug: Web/API/URL/hash +tags: + - API + - URL API + - URL + - Property + - Reference +translation_of: Web/API/URL/hash +--- +{{ APIRef("URL API") }} + +Свойство **`hash`** интерфейса {{domxref("URL")}} — это строка типа {{domxref("USVString")}}, +содержащая символ `'#'`, после которого идет идентификатор фрагмента URL-адреса. + +Фрагмент не [кодируется](/en-US/docs/Glossary/percent-encoding). Если URL-адрес не имеет +идентификатора фрагмента, то данное свойство содержит пустую строку — `""`. + +{{AvailableInWorkers}} + +## Синтаксис + +```js +const string = url.hash +url.hash = newHash +``` + +### Значение + +Строка типа {{domxref("USVString")}}. + +## Примеры + +```js +const url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/href#Examples'); +console.log(url.hash); // Выведет: '#Examples' +``` + +## Спецификации + +{{Specifications}} + +## Поддержка браузерами + +{{Compat}} + +## Смотрите также + +- Интерфейс {{domxref("URL")}}, которому принадлежит это свойство. -- cgit v1.2.3-54-g00ecf