Easy Tutorial
❮ Met Document Queryselectorall Met Node Appendchild ❯

Location host Property


Definition and Usage

The host property is a read-write string that sets or returns the host name and port number of the current URL.

Syntax


Browser Support

All major browsers support the host property.


Example

Return the host name and port of the current URL:

The output of the above example would be:

❮ Met Document Queryselectorall Met Node Appendchild ❯