From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/api/url/hostname/index.html | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 files/ko/web/api/url/hostname/index.html (limited to 'files/ko/web/api/url/hostname') diff --git a/files/ko/web/api/url/hostname/index.html b/files/ko/web/api/url/hostname/index.html new file mode 100644 index 0000000000..c6238452e0 --- /dev/null +++ b/files/ko/web/api/url/hostname/index.html @@ -0,0 +1,59 @@ +--- +title: URL.hostname +slug: Web/API/URL/hostname +tags: + - API + - Property + - Reference + - URL + - URL API +translation_of: Web/API/URL/hostname +--- +
{{ApiRef("URL API")}}
+ +

{{domxref("URL")}} 인터페이스의 hostname 속성은 URL의 {{glossary("domain name", "도메인 이름")}}을 담은 {{domxref("USVString")}}을 반환합니다.

+ +

{{AvailableInWorkers}}

+ +

구문

+ +
const domain = url.hostname
+url.hostname = domain
+ +

+ +

{{domxref("USVString")}},

+ +

예제

+ +
const url = new URL('https://developer.mozilla.org/ko/docs/Web/API/URL/hostname');
+console.log(url.hostname); // Logs: 'developer.mozilla.org'
+ +

명세

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('URL', '#dom-url-hostname', 'URL.hostname')}}{{Spec2('URL')}}Initial definition.
+ +

브라우저 호환성

+ + + +

{{Compat("api.URL.hostname")}}

+ +

같이 보기

+ + -- cgit v1.2.3-54-g00ecf