host property (location, a, area)
Specifies or retrieves the host name and port of the URL assigned to the object.
If you only need the host name, use the hostname property, and if you only need the port number, use the port property.
You can find the related objects in the Supported by objects section below.
This property is read/write.
String that specifies or retrieves the hostname and port.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the host property for an anchor:
Did you find this example helpful?
User Contributed Comments