JavaScript Reference/Javascript Properties/blockDirection — различия между версиями

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

Текущая версия на 08:22, 26 мая 2010

"blockDirection" Example

    
<html>
<body>
<p id="myP1" blockDirection="rtl" onClick="function1();">
Click in this text.
</p>
<script language="JavaScript">
    function function1() {
        var m = document.all.myP1.blockDirection; 
        alert(m);
    }
</script>
</body>
</html>



"blockDirection" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<address>                       <blockquote>                  |
|                |<body>                          <center>                      |
|                |currentStyle                    <custom>                      |
|                |<dd>                            defaults                      |
|                |<div>                           <dl>                          |
|                |<dt>                            <fieldset>                    |
|                |<form>                          <hn>                          |
|                |<isindex>                       <li>                          |
|                |<listing>                       <menu>                        |
|                |<ol>                            <p>                           |
|                |<plaintext>                     <pre>                         |
|                |<ul>                            <xmp>                         |
+----------------+--------------------------------------------------------------+



"blockDirection" Possible Values

Possible Values
ltr          flows from left to right
rtl          flows from right to left



"blockDirection" Syntax and Note

Note:
Read-only property. 
Sets the text flow direction. 
    
Syntax:
    
document.all.elementID.blockDirection