Area host attribute

Definition and usage

host Attribute set or returned href attribute value Hostname and port part.

href The attribute specifies the destination of the link in the area.

Note:If the port is not specified in the URL (or if it is the default port of the protocol - for example, 80 or 443), some browsers will not display the port.

See also:

JavaScript Reference Manual:location.host attribute

Example

Example 1

Return the hostname and port of the URL for a specific area in the image mapping:

var x = document.getElementById("venus").host;

Try it yourself

Example 2

Change the hostname and port of the URL for a specific area in the image mapping:

document.getElementById("venus").host = "www.example.com:300";

Try it yourself

Syntax

Return host attribute:

areaObject.host

set host attribute:

areaObject.host = hostname:port

প্রতিষ্ঠান

মান বর্ণনা
hostname:port URL-এর হোস্টনেম এবং পোর্ট নম্বর নির্ধারণ করে

প্রযুক্তিগত বিবরণ

ফলাফল: শব্দমালা মান, URL-এর ডোমেন (বা IP-এড্রেস) এবং পোর্ট নম্বর উল্লেখ করে

ব্রাউজার সমর্থন

চ্রোম এডজ ফায়ারফক্স স্যাফারি ওপেরা
চ্রোম এডজ ফায়ারফক্স স্যাফারি ওপেরা
সমর্থন সমর্থন সমর্থন সমর্থন সমর্থন