JavaScript Reference/Javascript Collections/blockFormats

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

"blockFormats" Example

    
<html>
<body>
<script language="JavaScript">
function function1(){
    alert("Number of blockformats: "+ myDhelper.blockFormats.count);
    var element = "";
    for (i = 1;i < myDhelper.blockFormats.Count;i++) { 
       element = element + ", " + myDhelper.blockFormats(i);
    } 
    alert("The names are:\n" + element); 
} 
</script>
<object id="myDhelper" 
        classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" 
        width="0px" 
        height="0px">
</object>
<input type="button" value="Retrieve blockFormats" onclick="function1();">
</body>
</html>



"blockFormats" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |Dialog Helper                                                 |
+----------------+--------------------------------------------------------------+



"blockFormats" JavaScript properties and JavaScript methods

JavaScript properties and JavaScript methods
 
Count, item()



"blockFormats" Syntax Parameters and Note

Note:
Returns an array of all block formats available in the Dialog Helper object.
The blockFormats collection has the Count property instead of the common length property. 
Its syntax is document.all.dialogHelperID.blockFormats.Count = integer.
    
Syntax:
    
dialogHelperName.blockFormats // returns all block formats
dialogHelperName.blockFormats(param1) // returns an individual block format

    param1   Required; the zero-based index