url.host


获取和设置网址的主机部分。

\Gets and sets the host portion of the URL.

const myURL = new URL('https://example.org:81/foo');
console.log(myURL.host);
// Prints example.org:81
myURL.host = 'example.com:82';
console.log(myURL.href);
// Prints https://example.com:82/foo 

分配给 host 属性的无效主机值将被忽略。

\Invalid host values assigned to the host property are ignored.

AltStyle によって変換されたページ (->オリジナル) /