function changeTextDirection() { document.getElementById("p1").style.direction="rtl"; } This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. TIY ...
text-align屬性指定元素文本的水平對齊方式。默認(rèn)值: left if direction is ltr, and right if direction is rtl 繼承: yes 版本: CSS1 JavaScript 語法: object.style.textAlign="right"屬性值值 描述 left 把文本排列到左邊。默認(rèn)值:由瀏覽器決定。 right 把文本排列到右邊。 center 把文本排列到中間。