HREFLANG Attribute | hreflang Property
 | DHTML文档教程 |
Sets or retrieves the language code of the object.
dhtml语法
| HTML | <ELEMENT HREFLANG
= sLang... >
|
|---|
| Scripting | object.hreflang(v) [ = sLang ] |
|---|
DHTML可能的值
| sLang | String that
specifies or receives the language code. |
The property is read/write.
The property has no default value.
Remarks
You must set the value of this property before you can retrieve it.
Language codes identify natural languages that are spoken, written, or otherwise used for the communication of information among people, and are defined and explained in tags for the identification of languages (rfc1766)
. computer languages are explicitly excluded from language codes.
DHTML代码范例
In the a element in the following example, the hreflang attribute specifies the language code of the u.s. version of english.
<a href="/hbcms/php/r.php?url=http%3a%2f%2fexample.microsoft.com/..." hreflang="en-us">anchor text</a>
是否符合公共标准
This property is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1
.
Applies To