[Edge]。→
element の内容のテキストの書字方向を取得/設定します。
HTML属性:dir
¶省く。
| element | HTMLElement オブジェクト。 |
|---|
テキストを書く方向を表す文字列。以下の何れか。
| ltr | 左から右へ |
|---|---|
| rtl | 右から左へ |
| auto | 要素の内容に基づいて要素の方向を決定する必要がある |
HTML:
<DIV id=IdTest dir="rtl">abc def</DIV>
JavaScript:
D=IdTest.dir; //=[string]:rtl
IdTest.dir="auto";
D=IdTest.dir; //=[string]:auto