Area pathname attribute
Definition and usage
pathname
Attribute sets or returns href attribute value The pathname part.
href
The attribute specifies the destination of the link in the area.
Note:In the following example:
- IE 9 and earlier versions return "jsref/venus.html"
- IE 10+, Firefox, Opera, Chrome and Safari return "/jsref/venus.html"
Example
Example 1
Return the URL path of a specific area in the image map:
var x = document.getElementById("venus").pathname;
Example 2
Change the URL path of a specific area in the image map:
document.getElementById("venus").pathname = "somenewpathname";
Syntax
Return pathname attribute:
areaObject.pathname
pathname özelliğini ayarlama:
areaObject.pathname = path
Özellik değeri
Değer | Açıklama |
---|---|
path | URL'nin yol adını belirler. |
Teknik Ayrıntılar
Dönüş değer: | Dizgi değeri, URL'nin yol adını ifade eder. |
---|
Tarayıcı Desteği
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Destek | Destek | Destek | Destek | Destek |