Area.host

JavaScript 1.1+, JScript 1.0+ Nav3+, IE 3+, Opera3+ Syntax

document.links[num].host

Description

The host property associated with an Area object contains the hostname and port that is specified in the URL and separated with a colon (:). This property is a read/write string.

Example

In Listing 7.10, a sports car picture site is created. Selecting your location determines from which site a large picture of the sports car is retrieved. This is accomplished by modifying the host property based on what site from which the user wants to receive the sport car pictures.

Listing 7.10 Modifying the host Property of the Area Object
 <html> <body> <center><h1><u>Sports Car Pictures</u></h1></center> <h3>Step 1: Choose a site close to you.</h3> ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.