JavaScript Reference/Javascript Properties/blockDirection

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

"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