JavaScript Reference/Javascript Properties/dir

Материал из Web эксперт
Перейти к: навигация, поиск

"dir" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1() {

   document.all.myP.dir = "rtl";

} </script>

ARABIC OR HEBREW IN TEXT THIS

</body> </html>


     </source>
   
  


"dir" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> | | | |

| |
<body> |

| |
<button> |

| |
|

| | | | |<col> <colgroup> | | |<custom>

| | | |

| |<dir>
| | |
document | | |
| | |<embed> <fieldset> | | | <form> | | |<frame> <frameset> | | |<head> <hn> | | |
<html> |

| | <iframe> | | |<img> <input type="button"> | | |<input type="checkbox"> <input type="file"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | <isindex> | | | <label> |

| |<legend>
  • | | |<link> <listing> | | |<map> <marquee> | | |<menu> <meta> | | |<nobr> <noframes> | | |<noscript> <object> | | |
      <optgroup> | | |<option>

      | | |<param> <plaintext> | | |

                                                            |
      |                |                                                    |
      |                |                                                     |
      |                |<script>                        <select>                      |
      |                |                                                 |
      |                |                                              |
      |                |<style>                                                  |
      |                |                                                  |
      |                |<tbody>                                                   |
      |                |                                                       |
      |                |
        | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>

        "dir" Possible Values

        <source lang="javascript"> Possible Values ltr left to right rtl right to left


        </source>



        "dir" Syntax and Note

        <source lang="javascript"> Note: Read and write property. Sets the text reading order. The property does not affect alphanumeric characters in Latin documents.

        Syntax:

        document.getElementById("elementID").dir = value document.all.elementID.dir = value // IE only


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |<title>