JavaScript Reference/Javascript Properties/hreflang

Материал из Web эксперт
Перейти к: навигация, поиск

"hreflang" Example

   <source lang="javascript">
   

<html> <head> <base id="myBase"> </head> <body> <a id="myAnchor" href="/index.htm" hreflang="en">www.wbex.ru site</a>

<button onclick="alert(myAnchor.hreflang);">Language</button> </body> </html>


     </source>
   
  


"hreflang" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <link> | +----------------+--------------------------------------------------------------+

     </source>
   
  


"hreflang" Syntax and Note

   <source lang="javascript">

Note: Read and write property. Sets the written language code for href destination.

Syntax:

document.getElementById("elementID").hreflang = value document.all.elementID.hreflang = value // IE only


     </source>