JavaScript Reference/Javascript Collections

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

"fonts" Example

   <source lang="javascript">
   

<html> <body> <object id="myHelper"

       classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" 
       width="0px" 
       height="0px">

</object> <button onclick="alert(myHelper.fonts.Count);">Number of fonts in the system</button> </body> </html>


     </source>
   
  


"fonts" is applied to

   <source lang="javascript">

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

     </source>
   
  


"fonts" JavaScript properties and JavaScript methods

   <source lang="javascript">

JavaScript properties and JavaScript methods

Count, item()


     </source>
   
  


"fonts" Syntax Parameters and Note

   <source lang="javascript">

Note: Returns an array of system-supported fonts in the Dialog Helper object. The fonts collection has the Count property instead of the length property. Its syntax is document.all.dialogHelperID.fonts.Count = integer.


Syntax:

dialogHelperName.fonts // returns all fonts dialogHelperName.fonts(param1) // returns an individual font

   param1   Required; the zero-based index 
   
     
     </source>