ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: HTML DOM :: HTML DOM hreflangÊôÐÔ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

HTML DOM hreflangÊôÐÔ


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:1617 :: ::

Definition and Usage
¶¨ÒåÓëÓ÷¨

The hreflang property sets or returns the language code of the linked resource.
hreflangÊôÐÔ¿ÉÉèÖûò·µ»ØËùÁ´×ÊÔ´µÄÓïÑÔ´úÂë¡£

Syntax
Óï·¨

anchorObject.hreflang=languagecode


Example
¾ÙÀý

The following example returns the language code of the linked resource:
ÏÂÃæ¾ÙÀýÖн«·µ»ØËùÁ´×ÊÔ´µÄÓïÑÔ´úÂ룺

<html>
<body>
<p><a id="myAnchor" hreflang="us-en" 
href="http://www.w3schools.com">W3Schools.com</a></p>
<script type="text/javascript">
x=document.getElementById("myAnchor");
document.write(x.hreflang);
</script>
</body>
</html>


ÑÝÁ·

Get the language code of a linked resource
µÃµ½ËùÁ´×ÊÔ´µÄÓïÑÔ´úÂë

ÆÀÂÛ (0) All