JavaScript Reference/Javascript Collections/blockFormats

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

"blockFormats" Example

   <source lang="javascript">
   

<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>


     </source>
   
  


"blockFormats" is applied to

   <source lang="javascript">

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

     </source>
   
  


"blockFormats" JavaScript properties and JavaScript methods

   <source lang="javascript">

JavaScript properties and JavaScript methods

Count, item()


     </source>
   
  


"blockFormats" Syntax Parameters and Note

   <source lang="javascript">

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
   
     
     </source>