propiedad HTML DOM Enlace hreflang
Definición y Uso
hreflang atributo especifica el documento vinculado el idioma chino.
gramática
Configuración de las propiedades hreflang:
linkObject.hreflang="language-code"
Volver propiedades hreflang:
linkObject.hreflang
Soporte para el navegador
Todos los principales navegadores soportan la propiedad hreflang
Ejemplos
Ejemplos
Mostrar documentos vinculados Idioma:
<! DOCTYPE html>
<Html>
<Head>
<Charset Meta = "UTF-8">
<Title> Este tutorial (w3big.com) </ title>
<Enlace id = "vínculo1" href = "domoarigato.htm" hreflang = "ja">
<Script>
displayResult función () {
var x = document.getElementById ( "vínculo1") hreflang .;
alerta (x);
}
</ Script>
</ Head>
<Cuerpo>
<Botón type = "button" onclick = "displayResult ()"> muestra el idioma elemento de enlace del documento </ botón>
</ Body>
</ Html>
<Html>
<Head>
<Charset Meta = "UTF-8">
<Title> Este tutorial (w3big.com) </ title>
<Enlace id = "vínculo1" href = "domoarigato.htm" hreflang = "ja">
<Script>
displayResult función () {
var x = document.getElementById ( "vínculo1") hreflang .;
alerta (x);
}
</ Script>
</ Head>
<Cuerpo>
<Botón type = "button" onclick = "displayResult ()"> muestra el idioma elemento de enlace del documento </ botón>
</ Body>
</ Html>
Trate »
Objetos de enlace