JavaScript Reference/Javascript Properties/compact

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

"compact" Example

    
<html>
<body>
<dl id="myDL"> 
    <dt>Definition List:</dt>
    <dt>1.</dt><dd>Definition 1.</dd>
    <dt>2.</dt><dd>Definition 2.</dd>
    <dt>3</dt><dd>Definition 3.</dd>
</dl>
<button onclick="myDL.rupact=true;">Compact</button>
<button onclick="myDL.rupact=false;">De-Compact</button>
</body>
</html>



"compact" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<dir> (IE6 only)                <dl>                          |
|                |<menu> (IE6 only)               <ol>                          |
|                |<ul>                                                          |
+----------------+--------------------------------------------------------------+



"compact" Syntax and Note

Note:
Read and write property. 
Remove extra spaces between a list element"s items or not.
    
Syntax:
    
document.getElementById("elementID").rupact = value
document.all.elementID.rupact = value // IE only