Sets or retrieves a value that indicates the reading order of the object.
dhtml语法
document.dir [ = sDir ]
DHTML可能的值
sDir | String that
specifies or receives one of the following values.ltr | Default. Content flows from left to right. | rtl | Content flows from right to left. |
|
The property is read/write.
The property has a default value of
ltr.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
remarks
unless explicitly set, the dir property has no return value when accessed in script.
the dir property does not affect alphanumeric characters in latin documents. these characters always render ltr. however, the property does affect punctuation characters in latin documents. for example, punctuation marks such as periods and question marks will render to the left of a sentence when the dir property is set to rtl.
the value of dir property has no effect on the orientation of coordinates for an object's positioning properties. for example, the left property and the right property perform the same placement in both cases. however, when both the left and right properties are specified, the left property takes precedence when the dir property is set to ltr. likewise, the right property takes precedence when the dir property is set to rtl.
applies to
更多语法参考
direction, HTML Character Sets