Oblast href Nemovitost
Příklad
Změna adresy URL odkazu v oblasti:
document.getElementById("venus").href = "sun.htm";
Definice a použití
Vlastnost href nastavuje nebo vrací hodnotu atributu href oblasti.
Atribut href určuje cíl odkazu v oblasti.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
href | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost href:
areaObject.href
Nastavte vlastnost href:
areaObject.href = URL
Hodnoty vlastností
Value | Description |
---|---|
URL |
Specifies the hyperlink target for the area. Possible values:
|
Technické údaje
Návratová hodnota: | Řetězec představující adresu URL odkazu. Vrátí celou adresu URL včetně protokolu (např. http://) |
---|
Další příklady
Příklad
Získejte adresu URL odkazu v oblasti:
var x =
document.getElementById("venus").href;
Příklad
Změňte adresu URL odkazu v oblasti na absolutní adresu URL:
document.getElementById("venus").href = "http://www.cnn.com/";
Související stránky
HTML reference: HTML <area> href atribut
❮ Oblastní objekt