TOC PREV NEXT INDEX

domref



dir


The dir property specifies the directionality of the text of the current element.

Syntax

directionality = element.dir
 
element.dir = directionality
 

Parameters

directionality is a string representing the direction of the current element text. See Notes below for a list of the valid directions.

Example

p = document.getElementById("para1");
 
p.dir = "rtl"; // change text direction on this <p>
 

Notes

The directionality of element text is which direction that text goes (for support of different language systems). Possible values for dir are ltr, for Left-to-right, and rtl, for Right-to-left.

Specification

dir
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX