urlObject.hostname


hostname 属性是 host 组件的小写主机名部分,不包括 port

例如:'sub.example.com'

The hostname property is the lower-cased host name portion of the host component without the port included.

For example: 'sub.example.com'.