Área objetivo Propiedad
Ejemplo
Cambie el objetivo para un área específica en un mapa de imagen:
document.getElementById("venus").target = "_blank";
Definición y uso
La propiedad de destino establece o devuelve el valor del atributo de destino de un área.
El atributo de destino especifica dónde abrir el documento vinculado.
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
target | Yes | Yes | Yes | Yes | Yes |
Sintaxis
Devuelve la propiedad de destino:
areaObject.target
Establezca la propiedad de destino:
areaObject.target = "_blank|_self|_parent|_top|framename"
Value | Description |
---|---|
_blank | Open the linked document in a new window |
_self | Open the linked document in the same frame as it was clicked (this is default) |
_parent | Open the linked document in the parent frameset |
_top | Open the linked document in the full body of the window |
framename | Open the linked document in a named frame |
Detalles técnicos
Valor devuelto: | Una cadena, que representa dónde abrir el documento vinculado |
---|
Más ejemplos
Ejemplo
Obtenga el objetivo de un área específica en un mapa de imagen:
var x =
document.getElementById("venus").target;
páginas relacionadas
Referencia de HTML: atributo de destino HTML <área>
❮ Objeto de área